HP Business BASIC/XL Reference Manual - HP 3000 MPE/iX Computer Systems - Edition 1 (32715-90001)
4-: 1
Chapter 4 Statements
Introduction
This chapter contains descriptions of each statement that can be used to
form programs in HP Business BASIC/XL. The statements are arranged in
alphabetical order. Each description contains the complete syntax of the
statement, examples, and other necessary information.
ACCEPT
The ACCEPT statement obtains a string of characters from the designated
input device without echoing those characters to the display as they are
entered. If a string variable is included in the ACCEPT statement, the
value of the string of characters is assigned to the string variable.
The characters in the entered string must be from the ASCII or default
foreign character set. Otherwise, the terminal beeps.
No line feed is generated following statement execution, so the cursor
remains on the same line.
Syntax
[ [
separator
]]
ACCEPT [
str_var
] [[
separator
]
option_clause
[
option_clause
]]...
Parameters
str_var
The string variable that the input string is assigned
to. Characters are assigned to the variable when you
type RETURN. Characters, such as a comma or a double
quote, are not considered to be a data item separator
or terminator within the input string. An ACCEPT
statement without a
str_var
discards the input.
option_clause
One of the following:
{TIMEOUT [=]
timeout_num_expr
}
{ELAPSED [=]
elapsed_num_var
}
{CHARS [=]
chars_num_expr
}
timeout_num_ expr
Numeric expression for the maximum amount of time, in
seconds, allowed for you to enter input. The input
time limit is determined as follows:
Value of Input Time Limit
timeout_num_ expr
Zero or less Unlimited
In the range That number of seconds rounded to
(0,255) nearest second
Greater than 255 Set to 255 seconds
If input time is limited through the use of the
TIMEOUT option, HP Business BASIC/XL transfers
control to the next program statement when the time
limit is exceeded without assigning a new value to
the specified
str_var
.
elapsed_num_var
A numeric variable that the time, in seconds, used to
enter the input is returned to. If the TIMEOUT
option is also specified, and that time limit is
exceeded,
elapsed_num_var
is set to -256.
If the ELAPSED option is not selected, the elapsed