Line Input # Statement
Reads data of one line from a file, communication port, database, or the device.
Syntax
Line Input #portNumber, stringVar$
Parameters
- portNumber
- ID number representing a file, communications port, database, or device. File number can be specified in ROpen, WOpen, and AOpen statements. Communication port number can be specified in OpenCom (RS-232C) or OpenNet (TCP/IP) statements. Database number can be specified in OpenDB statement.
- Device ID integers are as follows:
- 21 RC+
- 24 TP (TP1 only)
- 20 TP3
- stringVar$
- Specify the string variable name. (the string variable must end with the $ character.)
Description
Line Input # reads string data of one line from the device specified with the portNumber parameter, and assigns the data to the string variable stringVar$.
Notes
About the Controllers to use
For T/VT series, an error will occur at operation when RS-232C port of the Controller is specified.
See Also
Input, Input #, Line Input
Line Input # Statement Example
This example receives the string data from the communication port number 1, and assigns the data to the string variable A$.
Function lintest
String a$
Print #1, "Please input string to be sent to robot"
Line Input #1, a$
Print "Value entered = ", a$
Fend