Post Reply 
#Constant
10-10-2015, 09:24 AM
Post: #1
#Constant
Hi all,

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

like: Deg2Rad => pi/180

Cheers,

Jan
Find all posts by this user
Quote this message in a reply
10-10-2015, 10:39 AM
Post: #2
RE: #Constant
Do you mean something different than the Define function command (shift/Define)?

   

-Road
Find all posts by this user
Quote this message in a reply
10-10-2015, 06:01 PM
Post: #3
RE: #Constant
(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.

Piotr Kowalewski
Find all posts by this user
Quote this message in a reply
10-12-2015, 06:53 AM
Post: #4
RE: #Constant
Hello,

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

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 




User(s) browsing this thread: