HP Forums
input does not work anymore (10637 ) - 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: input does not work anymore (10637 ) (/thread-6922.html)



input does not work anymore (10637 ) - hpfx - 09-25-2016 08:30 PM

Hello,
I spent lot of time to discover that input cannot be used anymore to handle math expression. Many of my progs does not work anymore
here is a simple example I made to show you...
In old 8151 firmware this prog did work :
Code:
EXPORT abc()
BEGIN
LOCAL a;
INPUT({{a, [2]}},"test",{"y="},"","",{"2*X"});
PRINT(int(a));
END;

But in new firmware 10637 it does not work ! => Error. Bad Argument Value
surprised this wasn't checked on new firmware release...

The problem is that int() does not accept string anymore, is that a bug ?
But I found that I still could use single quote like this : int('2*X')
But what the hell ?! how can I get single quote out of a PRINT() ? Documentation does not explain it...

And WHERE is this f*** list of allowed types ?!!! And is there an "algebraic" type ?
I spent hours on that.

It is still possible to make program that manipulate math algebraic expression from user input ???


RE: input does not work anymore (10637 ) - roadrunner - 09-25-2016 11:43 PM

Try:

Code:
EXPORT abc()
BEGIN
 LOCAL a;
 print;
 INPUT({{a,[2]}},"test",{"y="},"","",{"2*x"});
 print(a);
 int(EVAL(a));
END;

-road


RE: input does not work anymore (10637 ) - roadrunner - 09-25-2016 11:51 PM

And see the document by Cyrille de Brébisson in post #9 of this thread for a more complete explanation:

http://www.hpmuseum.org/forum/thread-6218.html?highlight=kids

-road


RE: input does not work anymore (10637 ) - roadrunner - 09-25-2016 11:56 PM

I meant to type:

print(int(eval(a)));

in the modification of your code but you should get the idea.

-road