COMMAND [ HP Business BASIC/XL Reference Manual ] MPE/iX 5.0 Documentation
HP Business BASIC/XL Reference Manual
COMMAND
The COMMAND statement executes a string expression as if its value were a
program line.
Syntax
COMMAND str_expr
Parameters
str_expr Its value must be an executable statement with 500 or
fewer characters. If it is not, an error occurs.
The executable statement cannot be any of the following:
* A command-only statement (for example, LIST).
* A program-only statement (for example, INPUT).
* The COMMAND statement.
* Any statement that defines a construct (for example:
WHILE, END WHILE, or REPEAT).
The statement cannot be a declaration statement, because
declaration statements are not executable.
Examples
100 READ I
105 DATA 1
110 IF I THEN
120 Routine$="Routine1"
130 ELSE
140 Routine$="Routine2"
150 ENDIF
160 COMMAND "GOSUB " + Routine$ !Issue the GOSUB statement
170 STOP
180 Routine1: I=I+(2*I)+(3*I)
190 RETURN
200 Routine2: I=I*(2+I)*(3+I)
210 RETURN
220 END
The COMMAND statement is not compilable.
MPE/iX 5.0 Documentation