help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

constants or readonly variables


From: Francesco Potortì
Subject: constants or readonly variables
Date: Sat, 07 Nov 2015 11:51:48 +0100

>this is more of a style issue, but be aware that "e" in octave is a
>built-in
>
>octave:1> e
>ans =  2.7183
>
>​which you have just overwritten ...
>It could potentially result in some hard to debug problem.
>The same goes for "i" "j" (or "pi").
>I suggest to use "ee" or "ii" or "jj" var names instead.

Which makes me think of something.  What you describe is in fact an
annoying trap when programming in Octave.  A useful feature would be to
have the possibility to mark a variable as constant, or readonly.

-- 
Francesco Potortì (ricercatore)        Voice:  +39.050.621.3058
ISTI - Area della ricerca CNR          Mobile: +39.348.8283.107
via G. Moruzzi 1, I-56124 Pisa         Skype:  wnlabisti
(entrance 20, 1st floor, room C71)     Web:    http://fly.isti.cnr.it




reply via email to

[Prev in Thread] Current Thread [Next in Thread]