HP Forums
Variable e not usable for local-variable - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Variable e not usable for local-variable (/thread-4621.html)



Variable e not usable for local-variable - Arno K - 09-01-2015 10:01 PM

The program mentioned in the other thread needed some local variables, as I am lazy I usually take short names and came up with e, as it should hold the result of euler(n), the editor refused to take it. So I used the cas to find out that e cannot be taken as a variable at all although I think to have read that all small letters are available. That is not very serious but can be changed if the system used another symbol, perhaps a fat printed e, for 2.718..., just like it does with i.
Maybe more meaningful error messages, especially in cas-programs where no debugger is available would be helpful, too. Errors like this take more time to find than writing the whole program.
Arno


RE: Variable e not usable for local-variable - Joe Horn - 09-02-2015 03:22 AM

(09-01-2015 10:01 PM)Arno K Wrote:  The program mentioned in the other thread needed some local variables, as I am lazy I usually take short names and came up with e, as it should hold the result of euler(n), the editor refused to take it. So I used the cas to find out that e cannot be taken as a variable at all although I think to have read that all small letters are available.

Neither e nor i can be used as variables in Home or in CAS.

(09-01-2015 10:01 PM)Arno K Wrote:  That is not very serious but can be changed if the system used another symbol, perhaps a fat printed e, for 2.718..., just like it does with i.

Even though i is often displayed as a stylized i, it can be keyed in by the user as a plain i, so i must still remain a reserved PPL word. So even if they started calling e "e", it wouldn't stop e from being a reserved PPL word.


RE: Variable e not usable for local-variable - Arno K - 09-02-2015 08:12 AM

(09-02-2015 03:22 AM)Joe Horn Wrote:  
(09-01-2015 10:01 PM)Arno K Wrote:  The program mentioned in the other thread needed some local variables, as I am lazy I usually take short names and came up with e, as it should hold the result of euler(n), the editor refused to take it. So I used the cas to find out that e cannot be taken as a variable at all although I think to have read that all small letters are available.

Neither e nor i can be used as variables in Home or in CAS.

(09-01-2015 10:01 PM)Arno K Wrote:  That is not very serious but can be changed if the system used another symbol, perhaps a fat printed e, for 2.718..., just like it does with i.

Even though i is often displayed as a stylized i, it can be keyed in by the user as a plain i, so i must still remain a reserved PPL word. So even if they started calling e "e", it wouldn't stop e from being a reserved PPL word.

Well, that is correct and perhaps ok, but contrary to e i can be used as a local variable and this is what I am interested in.
Arno