Rockwell Automation 1771-DB BASIC MODULE User Manual
Page 164

Chapter
Statements
11
11 -12
Use the GET statement in the Run mode. GET returns a result of zero in
the Command mode. The GET operator reads the console input device.
If a character is available from the console device, the value of the
character is assigned to GET. After GET is read in the program, it is
assigned the value of zero until another character is sent from the console
device.
The GET statement is read only once before it is assigned a value of zero.
This guarantees that the first character entered is always read, independent
of where you place the GET statement in the program. The program port
is buffered with a 256 byte circular transmit queue and 256 byte circular
receive queue.
Use the GET# operator to read port PRT2 and the GET@ operator to read
port PRT1.
Syntax
GET
GET#
GET@
Example
>10 A = GET
>20 IF (A<>0) THEN PRINT A : REM ZERO MEANS NO ENTRY
>30 GOTO 10
>RUN
65 [A]
49 [1]
24 [^X]
50 [2]
STOP – IN LINE 30
READY
>
GET