HP Forums

Full Version: Basic INPUT help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am trying to create a basic input. Here is what I got:

EXPORT TEST()
BEGIN
LOCAL A;
INPUT({{A,[1]}},"TEST"," INTEGER INPUT:")
END;

I want to limit the inputs to integers only, and not floats, however when I try to enter anything into the box, I get "Invalid Input".

What am I not understanding here?
Hello,
With os version 10637 it didn't work for me as well. .
It worked with type 2 (strings) and type 0 (reals) not with type 1 (integers).

Thanks
It works but you have to enter the integer with a # prefix and an optional base suffix (d,b,o,h).
Ok. Well that seems counter intuitive. I wanted to use the input form as a easy way to input values and work on them, using the filter type of integer seems like a waste if you have to enter a #d for each enter instead of just entering a integer.

I thought it would be an easy way to protect against non integer values. Leaving it open to all types will be fine for now until I get more familiar with this programing language.
Well let me ask some advice, because this relates to my other question I posted with the solve() not working right.

Basically I am trying to make a simple INPUT dialog that updates every time the user enters some values. I have the INPUT running in a while loop.
When the number are input, the variables get worked on, and re updated, and the loop restarts, populating the INPUT with the new values.
I wanted to use the simple solve() command to solve for one of three values.
For example

While INPUT({A,B,C},"Test Input) > 0 DO
// Some testing here to find which solve() line to run
solve(A+B=C,A)sto>A
solve(A+B=C,A)sto>B
solve(A+B=C,A)sto>C
END;

So basically, i check to see witch value needs updating, and based on the other two, the solve() finds the answer. This is a crude example, but about as simple as I need.

I know there is the Solver which does work, but I was trying to get this to work in a program without the need to have to enter a formula first and then run the Solver.


Is there an easier way to go about this?
(04-01-2017 04:13 PM)AngryNapkin Wrote: [ -> ]Ok. Well that seems counter intuitive. I wanted to use the input form as a easy way to input values and work on them, using the filter type of integer seems like a waste if you have to enter a #d for each enter instead of just entering a integer.

"integers" in home refer to a fixed size, specific base encoded value more akin to a lower lever computer register value. For example, you can have a 16 bit, signed, octal number and similar things.
Reference URL's