Omron SYSMAC C200H-ASC02 Operation Manual page 71

Ascii unit
Hide thumbs Also See for SYSMAC C200H-ASC02:
Table of Contents

Advertisement

BASIC Language
EOF Function
ERR and ERL Variables
FRE Function
INKEY$ Function
INPUT$ Function
Purpose:
To check whether the specified port buffer is empty
Format:
EOF (<port#>)
Example:
IF EOF (2) THEN CLOSE#1 ELSE GOTO 100
Remarks:
This function returns true (-1) if the specified port is empty. If not, it returns
false (0). Note that the port specified by <port#> must already be open and in
the input mode.
Purpose:
To return the error code and the location (line number) of the
error
Format:
x = ERL
y = ERR
Remarks:
When an error occurs, the error code is assigned to the variable ERR and
the statement number is assigned to ERL.
If the statement that caused the error was executed in direct mode, state-
ment number 65535 is assigned to ERL.
ERL and ERR can be used in error handling routines to control the execution
flow of the program.
Purpose:
To return the amount of unused memory
Format:
FRE(0)
FRE(<x$>)
Example:
PRINT FRE (0)
Remarks:
If the argument is numeric, the number of unused bytes in the program area
is given.
If the argument is a character expression, the number of unused bytes in the
character variable area is given.
Purpose:
To return the character code of the key being pressed
Format:
INKEY$ [#<port>]
Example:
A$ = INKEY$
Remarks:
A null string is returned if no key is being pressed. Any key input other than
CTRL+X is valid. Port 1 is the default port.
Purpose:
To Read a string of characters from the keyboard or from a pe-
ripheral device
Format:
INPUT$ (<num>[,#<port>])
<num> is the number of characters to be input. <num> must be
from 1 to 255.
Section 4-2
61

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents