HP Forums

Full Version: INPUT command [allowed_types_matrix]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi Friends,

I need to create an INPUT with ONE field that accept REALS (0 type) and too FUNCTIONS (8 type) so I used [ 0 , 8 ] as [allowed_types_matrix] ... this field only accept REALS (0 type) AND WITH 'X+5' GIVES "Error : Invalid input"

I created the following program for example (with 2 fields to not leave the form and test many times):

PHP Code:
EXPORT INPUTTEST
BEGIN
LOCAL fx
a;
fx:='SIN(X)'a=0;
INPUT(
   {{
fx,[0,8],{44,54,1}},{a,[0],{44,54,2}}},
    
" INPUT TEST ",
   {
"F(X):""Real a :"},
   {
"Enter F(X), could be constant, example = 5 ""Enter a real value"},
   {
'SIN(X)'0})
END

Please Your help with any suggestion, thanks.

Best regards!!
josephec
Input is failing!
With {{fx,[8]} it should be enough, but currently it seems not to accept data if it does not contain any variable, clearly this is a bug.
(02-16-2018 01:34 AM)Carlos295pz Wrote: [ -> ]Input is failing!
With {{fx,[8]} it should be enough, but currently it seems not to accept data if it does not contain any variable, clearly this is a bug.

Thanks Carlos.. I will use only type 8. And if the user needs to enter a REAL 5 would use '5+0' trick.
Have a great day.
Josephec
Reference URL's