-
Notifications
You must be signed in to change notification settings - Fork 154
Triple declaration of same local/global doesn't replace #882
Open
Assignees
Description
Hi,
Perhaps this has been noted before.
(Using FORM 5.0.1) Declaring a local with the same name twice redefines the local. If you do it a third time (or more) it creates repeat locals that appear in print, but cannot be accessed through, for example, hide. The effects of identify statments do affect them.
For example
s x;
l result = 1+x;
l result = 1+2*x;
l result = 1+3*x;
l result = 1+4*x;
.sort
id x=x^2;
.sort
Hide result;
.sort
print +s;
.end
Outputs at the print statement
result =
1 + 2*x^2;
result =
1 + 3*x^2;