Rockwell-automation 1746-BAS BASIC LANGUAGE User Manual Page 229

  • Download
  • Add to my manuals
  • Print
  • Page
    / 280
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 228
Publication 1746-RM001A-US-P
Input Functions 13-39
Syntax
GET
Example
>1 REM EXAMPLE PROGRAM
>10A=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
>
The GET operator 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 the
GET operator is placed in the program. There is no buffering of characters on the
program port.
INPL
Purpose
Use the INPL statement to read an entire line (up to 254 characters) from program
port buffer. The line must be stored in a string variable. The INPL statement reads
all characters from the program port until a carriage return or the 254 character
limit is reached, whichever comes first. INPL does not echo characters read from
the program port.
Use the INPL# statement to read an entire line of characters from the PRT2 port
buffer. Use the INPL@ statement to read an entire line of characters from the
PRT1 port buffer. Both these statements function like the INPL statement.
Syntax
INPL string_variable
Page view 228
1 2 ... 224 225 226 227 228 229 230 231 232 233 234 ... 279 280

Comments to this Manuals

No comments