HP 3000 Manuals

ENTER [ HP Business BASIC/XL Reference Manual ] MPE/iX 5.0 Documentation


HP Business BASIC/XL Reference Manual

ENTER 

The ENTER statement assigns characters that are already present in
display memory to HP Business BASIC/XL variables.  User input from the
keyboard is not accepted.

A value is read from the display memory starting from the cursor position
until each enter_item has been assigned or until the end of data on the
line.  When there are no more data on a display memory line, the
remaining variables in the ENTER statement are not assigned a new value.
Commas act to separate values on the line like they do in the INPUT
statement.  Since any necessary conversion is performed on the data read
from the display memory prior to assigning it to HP Business BASIC/XL
variables, it is possible to get an error ENTERing numeric variables.
For example, attempting to assign the value  '99*8'  to a numeric
variable causes an error.

The ENTER statement can be used to read data from fields of an active
JOINFORM into HP Business BASIC/XL variables.  Refer to Appendix F of
this manual for more information.

Syntax 

      {enter_element}[{,}{enter_element}]
ENTER {for_clause   }[{;}{for_clause   }]...

Parameters 

enter_item       enter_element or for_clause 

enter_element    One of the following:

                      num_var 
                      str_var$
                      array_name ([*[,*]...])
                      str_array_name $([*[,*]...])

                 The last format above has one asterisk per dimension or
                 does not have asterisks.  Not using asterisks specifies
                 any number of dimensions.  Either format is legal, but
                 the format without asterisks is not compilable.
                 Substrings are also allowed.

for_clause       (FOR num_var=num_expr1 TO num_expr2 [STEP num_expr3],
                 enter_item [, enter_item]...)

                 A for_clause is useful for reading array elements.
                 Refer to "FOR Clause in Input List" in chapter 6 for
                 more information.

Examples 

     300 ENTER Num_var                !Enters a value for Num_var
     310 ENTER Num_var,Str_var$       !Enters a numeric and a string value
     330 ENTER (FOR I=1 to 2,A$(I))   !Enters two elements of a string array



MPE/iX 5.0 Documentation