Rockwell Automation 57C610 Enhanced Basic Language, AutoMax User Manual
Page 73

6Ć33
6.8.2
CLOSE Statement
The CLOSE statement is used to deĆallocate a channel or port to
allow other application tasks to have access to it. The CLOSE
statement has the following format:
CLOSE #logical_device_number, #logical_
device_number,...
where:
logical_device_number = number assigned to device by OPEN
statement (1 to 255)
The following are valid CLOSE statements:
20 CLOSE #1,#2
99 CLOSE #3
The number symbol (#) must always be present in front of the
logical device number assigned to the device.
If PRINT or INPUT statements use the default port (e.g., PRINT F%
or INPUT M$), there is no need for either an OPEN or CLOSE
statement.
Channels that are opened, as opposed to devices, remain opened
until the task is restarted.
Refer to the OPEN statement description (6.8.1) for more informtion
on how the CLOSE statement is used with the OPEN statement.
6.8.3
INPUT Statement
The INPUT statement is used to prompt an operator to input data
from a device or channel. It has the format:
INPUT #logical_device_number, input_list
where:
logical_device_number =
number assigned to device or channel by OPEN statement (1 to
255). Not used if default device is used.
input_list =
list of variables to be read. Variables can be simple or
subscripted (no expressions).
The optional parameter :EMPTY=n can be used to transfer control
of the program in the event that the channel is empty. This option is
only allowed for channels and not devices. The parameter is added
immediately after the device number; n is the line number to which
to transfer control.
If more than one variable is to be read, the fields must be separated
by commas when entered. Any extra spaces or tabs between the
input fields are ignored.
When an INPUT statement is executed in BASIC, an input prompt is
printed to the device to indicate that the system is waiting for
something to be entered. The input prompt is a question mark
followed by a space (?).
The number of fields requested in the INPUT statement are then
entered at the device, followed by the terminator character (
If all of the requested fields are not entered prior to the (