Post Reply 
Connectivity Kit Program view/edit - STO arrow
10-06-2015, 05:31 AM
Post: #8
RE: Connectivity Kit Program view/edit - STO arrow
Hello,

> E1:="A=3.14*R^2" checks and runs correctly
You should use E1:='A=3.14*R^2'

Your version stores a string in the E1 variable. I believe (not 100% sure) that there is some code to transform the string in a function in the store command for E1, but it is better to store directly the function in E1 which is what you do by placing the simple quotes around the function.
simple quotes do a non-eval of the parameter. Had you simply types E1:=A=3.14*R^2 the A=3.14*R^2 would be first evaluated (returning a true/false depending if A is or is not equal to 3.14*R^2 and storing that boolean value in E1.


>Pitty HP choose to use non standard characters for programming.
Actually, they did. := is a store operation (which is a standard in languages like pascal).
the ▶ version of store is/was mostly used in mathematic and algorytmical circles which (rightfully so) put the focus FIRST on the calculation and second on what do to with the calculation. This is why the ▶ syntax is expression sto variable compared with the classical programming variable receive the result of expression.
I guess that |> could also be recognized as a sto to make it easier.
One of the issue is that programming did 'borrow' a number of math symbols to make them say something else (due to the small number of symbols on the keyboard), and that a lot of these symbols are overloaded already.
This makes it very hard for the calculator that has to do both math AND programmation.
For example the use of the {} for list did effectively force HP to find another way to handle program blocks (BEGIN and END in this case).
It makes life hard for all involved...

Cyrille

Cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Connectivity Kit Program view/edit - STO arrow - cyrille de brébisson - 10-06-2015 05:31 AM



User(s) browsing this thread: 1 Guest(s)