Omron C200H-ASC11 Manual page 172

Ascii units
Hide thumbs Also See for C200H-ASC11:
Table of Contents

Advertisement

Details of BASIC Commands
input
Syntax:
INPUT
Statement. Accepts input to a specified variable or variables during program execution.
Description:
<port expression> is an expression returning an integer in the range: [1... 3]. If the <port
Remarks:
expression> is omitted, the terminal port's port number is the default (port #1 for the ASC11/21 or
port #3 for the ASC31).
<prompt> is an optional text string that is output to the terminal to prompt for the input. If the
prompt is followed by a semi-colon then a '?' will be appended, this can be suppressed by using a
comma after the prompt string. If the port specified is not configured as a "TERM" or a "COMU"
port then the prompt and the ? will be suppressed. (When the ? is not to be displayed for a
"COMU" port, use the LINE INPUT statement.)
Strings input to the
The <variables> specified to receive the input can be any valid variable name. The number of
values entered must be the same as the number of variables specified in the
the type of each value entered at the prompt must correspond to the types of the variables
specified in the
Input is terminated by a carriage return.
Multiple values can be input by separating them by commas.
Note:
Examples:
> 10 INPUT "ENTER YOUR NAME : ", A$
> 20 PRINT "HELLO ";A$
> 30 END
> RUN
ENTER YOUR NAME : FRED <CR>
HELLO FRED
See also:
LINE INPUT
[;] [# <port expression>,][<prompt> (; | ,)]<variable> {, <variable>}
statement need not be surrounded by quotes.
INPUT
statement. Otherwise, a "NO SUPPORT" error (code 0064) will result.
INPUT
1. If the port expression is not specified the terminal port is default.
2. Port #3 corresponds to the terminal port of the ASC31.
3. If Port #3 is specified on the ASC11 or ASC21, an "ILLEGAL FUNCTION CALL"
error (code B005) will result.
4. Execution of the BASIC program will be paused and the BASIC LED indicator on
the front of the Unit will flash slowly until the <CR> code is input.
5. If an interrupt occurs while the INPUT statement is waiting for an input and the
interrupt is not disabled or stopped, the interrupt subroutine will be processed
immediately. Program execution will resume from the INPUT command when the
interrupt subroutine has been completed.
6. If a semi-colon is added after the INPUT, the cursor will remain on the same row
after input.
7. When the terminator section of the receive data is CR + LF, only CR will be
accepted as the INPUT statement, so LF will remain in the receive buffer.
,
WAIT
7-6
Section
statement and
INPUT
163

Advertisement

Table of Contents
loading

This manual is also suitable for:

C200h-asc21C200h-asc31

Table of Contents