[Scilab-users] Question on constant variables
Federico Miyara
fmiyara at fceia.unr.edu.ar
Wed Nov 27 22:51:38 CET 2019
Dear all,
What is the reason why %pi, %e, %i, %f, %t are considered variables (see
help percent) when they are really constants?
If %pi were a variable with the only detail that it has a preassigned
value (while a bit dangerous, it could have been a possibility), then
this would be possible:
--> %pi = 2
However, one gets the following warning:
Redefining permanent variable.
This is misleading since one would think that the value has been indeed
changed, but entering
--> %pi
produces
%pi =
3.1415927
That's pi, not 2!
So it would be better an error message such as
Attempt to redefine permanent variable not allowed.
Now, a similar attempt such as
--> %f = 2
yields a completely different message:
Error: syntax error, unexpected =, expecting end of file
And, of course, the result of invoking %f keeps being F.
Regards,
Federico Miyara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20191127/60b92313/attachment.htm>
More information about the users
mailing list