![background image](http://html1.mh-extra.com/html/omron/sysmac-c200h-asc02/sysmac-c200h-asc02_operation-manual_742429048.webp)
38
A comma may be used instead of a semicolon after the prompt string to sup-
press the question mark.
Data is not accepted by the INPUT statement until a carriage return is en-
tered. Therefore input can be edited with the backspace and delete keys.
When more than two variables are input, they must be delimited by commas
or colons.
The data entered is assigned to the variables specified by the INPUT state-
ment. The number of values entered must be the same as the number of
variables in the INPUT statement.
The variable names in the list may be numeric or string variable types as well
as subscripted variables (array variable). The type of each entered data item
must agree with the type specified by the variable name.
Strings input to an INPUT statement need not be surrounded by quotation
marks.
Responding to INPUT with too many or too few items will cause an error
message to be displayed prompting the user to re-enter the data.
If a peripheral device other than TERM or COMU is selected by the OPEN
statement, neither the prompt statement nor “?” is displayed.
To eliminate “?” when COMU, etc., is selected by the OPEN statement, use
the LINE INPUT command.
The INPUT statement cannot be executed in direct mode. If the port number
is omitted, port 1 is assumed as the default port.
KEY(n) Statement
Purpose:
To enable, disable, or stop an interrupt invoked by key input and
defined by the ON KEY GOTO or ON KEY GOSUB statements
Format: KEY(<n>)
ON/OFF/STOP
<n> is the key number (1-8).
Example: KEY(4)
ON
Remarks:
The KEY ON statement enables an interrupt invoked by keyboard input. After
this statement has been executed, an interrupt will be triggered each time the
specified key is input. Program execution then branches to an interrupt ser-
vice routine defined with the ON KEY GOTO or ON KEY GOSUB statements.
The KEY OFF statement disables the interrupt; key input will no longer trig-
ger an interrupt.
The KEY STOP statement also disables the interrupt. However, if the inter-
rupt is subsequently enabled with the KEY ON statement, execution will then
branch to the interrupt service routine defined by the ON KEY GOTO or ON
KEY GOSUB statements.
Execute the KEY OFF statement at the end of the program.
Program Example:
10
OPEN #1, “TERM:(42)”
20
ON KEY 1 GOSUB 100
30
On KEY 2 GOSUB 200
40
A=0
50
KEY ON
60
GOTO 60
BASIC Language
Section 4-2
Содержание SYSMAC C200H-ASC02
Страница 1: ...Cat No W165 E1 04 ASCII Unit SYSMAC C200H ASC02 ...
Страница 2: ...C200H ASC02 ASCII Unit Operation Manual Revised September 2002 ...
Страница 3: ...iv ...
Страница 5: ...vi ...
Страница 7: ...TABLE OF CONTENTS viii Glossary 159 Index 163 Revision History 165 ...
Страница 122: ...Appendix B Specifications 115 130 35 100 5 ...
Страница 167: ...Cat No W165 E1 04 Note Specifications subject to change without notice Printed in Japan Authorized Distributor ...
Страница 168: ...Cat No W165 E1 04 C200H ASC02 ASCII Unit OPERATION MANUAL ...