HP Forums
INPUT command OK and Cancel parameters - 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 command OK and Cancel parameters (/thread-111.html)



INPUT command OK and Cancel parameters - Bob Frazee - 12-15-2013 09:36 PM

Page 551 in Prime User Manual
INPUT
Syntax: INPUT(var [,"title", "label",
"help", reset]);
Opens a dialog box with the title text title, with one
field named label, displaying help at the bottom and
using the reset value if "Shift" "Esc" is pressed.
Updates the variable var if the user taps "OK" and
returns 1
. If the user taps "Cancel", it does not update the
variable, and returns 0.

Where can I capture the above OK and Cancel values to test if they have been selected?
rcf


RE: INPUT command OK and Cancel parameters - Han - 12-15-2013 10:31 PM

The function INPUT() itself returns 1 or 0. Example:

Code:

IF INPUT(…) THEN
  // code for INPUT() returning a 1
ELSE
  // code for INPUT() returning a 0
END;

You can optionally do something like: t:=INPUT(…); where t is a local/global variable and test the value of t later on.


RE: INPUT command OK and Cancel parameters - Bob Frazee - 12-16-2013 12:23 AM

Thanks Han. That answered my question.
rcf