The Museum of HP Calculators

HP Forum Archive 21

[ Return to Index | Top of Index ]

HP Prime EVAL function question
Message #1 Posted by Jonathan Cameron on 28 Sept 2013, 5:19 p.m.

Suppose I want to put a function call into a string and call it later. How do I do that?

For instance, if I try:

    EVAL("SIN(30)")
all I get is:
    "SIN(30)"
How do I get it to actually evaluate the string?

-Jonathan

Edited: 28 Sept 2013, 6:06 p.m.

      
Re: HP Prime EVAL function question
Message #2 Posted by Jonathan Cameron on 28 Sept 2013, 6:35 p.m.,
in response to message #1 by Jonathan Cameron

Ok, found the answer to my own question!

You must use the single quotes:

   EVAL('SIN(30)')  ==>   .5
            
Re: HP Prime EVAL function question
Message #3 Posted by Han on 28 Sept 2013, 8:58 p.m.,
in response to message #2 by Jonathan Cameron

Quote:
Ok, found the answer to my own question!

You must use the single quotes:

   EVAL('SIN(30)')  ==>   .5


You may have been thinking of:

EXPR("SIN(30)");

which is another way to do it.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall