The Interactive Geometry Software Cinderella

Forum: Cinderella Support (E)

Forums->Cinderella Support (E)->CindyScript local() does not work for nesting

wdheker
3 stars
CindyScript local() does not work for nesting


Using v2.9, build 1835, using local() for the same variable in multiple functions does not work:
test2() :=
(
local (next);
next = 2;
err(next);
);
test1() :=
(
local (next);
next = 1;
err(next);
test2();
err(next);
);
test1();

results in

next ==> 1
next ==> 2
next ==> 2 <<<< expect 1

 
on: Fri 16 of Aug, 2019 [12:45 UTC] reads: 57959

Posted messages

author message
wdheker
3 stars
Re: CindyScript local() does not work for nesting
on: Fri 16 of Aug, 2019 [13:37 UTC]
Forget it: I should have used regional().

I had forgotten that local() is deprecated, and only works together with release().
Sorry to bother you!




Show posts:
 
Language