[QUESTION] data types on "input" cmd
|
12-07-2016, 02:43 PM
(This post was last modified: 12-07-2016 08:11 PM by compsystems.)
Post: #1
|
|||
|
|||
[QUESTION] data types on "input" cmd
Hello HP-PRIME programmers and users
According to the help in data types of "INPUT" cmd, if the value is -1, it means "allow all types" (REAL, COMPLEX, ..., etc), I'm misunderstanding?. Executing the dialog box, an output message is generated "Error: Invalid input" Why? Test code PHP Code: export input0() |
|||
12-07-2016, 05:02 PM
(This post was last modified: 12-07-2016 05:03 PM by Tim Wessman.)
Post: #2
|
|||
|
|||
RE: [QUESTION] data types on "input" cmd
(12-07-2016 02:43 PM)compsystems Wrote: return ([a, b, c]); You are returning a vector/matrix of strings. That is not a valid object type. Try typing ["1"] and you will see the same error. TW Although I work for HP, the views and opinions I post here are my own. |
|||
12-07-2016, 05:42 PM
(This post was last modified: 12-07-2016 08:15 PM by compsystems.)
Post: #3
|
|||
|
|||
RE: [QUESTION] data types on "input" cmd
Thanks TIM, the output is converted into a string
Thus requires conversion to expression return ([a, b, c]); -> return ([expr(a), expr(b), expr(c)]); or return ({a, b, c}); A help for data types I think initialization variables should also be detected with the data type, in order to load correctly. The following code does not generate error, Type defined LIST, type loaded Matrix, should generate a"Error: Invalid type , a list is expected" PHP Code: export input0() |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)