
INPUT
Syntax: INPUT(var,[“title”], [“label”], [“help”], [reset_value],
[initial_value])
Syntax: INPUT({vars},[“title”], [{“labels”}], [{“help”}], [{reset_values}],
[{initial_values}])
The simpler form of this command opens a dialog box with the given title and one eld named label,
displaying help at the bottom. The dialog box includes the CANCEL and OK menu keys. The user can enter a
value in the labeled eld. If the user presses the OK menu key, the variable var is updated with the entered
value and 1 is returned. If the user presses the CANCEL menu key, the variable is not updated and 0 is
returned.
In the more complex form of the command, lists are used to create a multi-eld dialog box. If var is a list, each
element can be either a variable name or a list using the following syntax.
●
{var_name, real, [{pos}]} to create a check box control. If real is >1, this check box gets pooled with the
next n -1 check boxes in a radio group (that is, only one of the n check boxes can be checked at any time)
●
{var_name, [allowed_types_matrix] , [{pos}]} to create an edit eld. [allowed_types_matrix] lists all the
allowed types ([-1] stands for all types allowed). If the only allowed type is a string, the edition hides the
double quotes.
●
{var_name, {Choose items}, [{pos}]} to create a choose eld.
If pos is specied, it is a list of the form {eld start in screen %, eld width in screen%, line(starts at 0)}. This
allows you to control the precise position and size of your elds. Note that you have to specify pos for either
none or all elds in the dialog box.
There is a maximum of seven lines of controls per page. Controls with more than seven lines are placed in
subsequent pages. If more than one page is created, ["title"] can be a list of titles.
608 Chapter 28 Programming in HP PPL
Kommentare zu diesen Handbüchern