HP Forums
STO> vs := - 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: STO> vs := (/thread-9098.html)



STO> vs := - Dave Britten - 09-18-2017 01:31 AM

Is there any significant difference between STO> and := for variable assignment? The help text for the two is slightly different in a way that makes me think there might be. I know STO> is also used for the unit conversion shortcut.


RE: STO> vs := - cyrille de brébisson - 09-18-2017 05:26 AM

Hello,

Functionally, they are the same (the same code is sued for both).

There is the |>_unit shortcut that does exist, but is a parser hack, not a sto functionality (comes from the CAS).

|> is more of the "math" notation while := is more of a computer science one..

Appart from that, identical.

Cyrille


RE: STO> vs := - Dave Britten - 09-18-2017 11:50 AM

Thanks for clearing it up. I'll probably stick with := simply because it's easier to type on a PC. Smile


RE: STO> vs := - cyrille de brébisson - 09-19-2017 05:27 AM

Hello,

I would agree with you here.

The main difference stand in your order of thinking. := means I need to update the value of a variable. Let me think what I need to set it to.
|> means: I do a calculation... and I want to save it's result somewhere for later use...

As you can see, 2 different way of thinking can lead to 2 different use of the 2 different sto.

Cyrille