Now don't run ? - 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: Now don't run ? (/thread-6207.html) |
Now don't run ? - ggauny@live.fr - 05-06-2016 06:43 AM Hi, An old program from Mic Nick now don't run. I don't know why, may be help ? Thanks. RE: Now don't run ? - Tim Wessman - 05-06-2016 02:01 PM Hello, The reason is because when INPUT(f,"...") is run, the expression you type is EVALUATED. If X=2, and you type X^2-1, on exit the INPUT form evaluates and you get 2^2-1, or 3 as your value for f. You can either put your expression inside ' ' using the two keys [SHIFT][ ( ) ], or put in " " around your expression. 'X^2-1' or "X^2-1" will both work. You can modify the program to be like this to avoid needing to do ' ' or " ". INPUT({{f,[2]}}, ....); RE: Now don't run ? - ggauny@live.fr - 05-07-2016 06:44 AM Hi Tim, Very many thank you. It run now. Good day. RE: Now don't run ? - leprechaun - 05-07-2016 07:30 AM Cool. Could someone elaborate a bit on the reason that the proposed sollution works? Would be really helpful. I am confused because of the double list and the vector [2] which I cannot explain. edit: well some thinking and a fresh cup of coffee made me realize that [2] is the allowed type String. Is it right that in this case the entry is converted to an unevaluated string because you specified that the allowed type is string? RE: Now don't run ? - Tim Wessman - 05-07-2016 07:58 PM Exactly, specifiying string means it will not evaluate anything. Storing into F1:="<string>" is a special case and will convert to an expression. |