HP Forums

Full Version: INPUT command OK and Cancel parameters
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
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.
Thanks Han. That answered my question.
rcf
Reference URL's