HP Forums

Full Version: #Constant
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all,

Is it posible to define a constant in the HP Prime?

like: Deg2Rad => pi/180

Cheers,

Jan
Do you mean something different than the Define function command (shift/Define)?

[attachment=2654]

-Road
(10-10-2015 10:39 AM)roadrunner Wrote: [ -> ]Do you mean something different than the Define function command (shift/Define)?

Generally the "Define" is ok for calculations in HP Prime, but not for programming purposes.
Equivalent of "const" like from other programming languages would be useful.
Currently, it can be replaced by using variable, but the use of a "const" would definitely be faster and safer (to prevent overwriting of value).
The use of variable requires reading its values everytime when it is used in program. In contrast, a constant is substituted at the stage of compilation and it is not needed to be reading during program execution.
Hello,

Nope, there is no such thing in PPL. Sorry.

Cyrille
Reference URL's