Programming with Reflection

image\rwnprg32.gif ReadLine method


Syntax LineRead = object.ReadLine([Timeout], [Options], [SawEndOfLine])



Reads a line of data from the host until a linefeed character (ASCII decimal 10) is received. Carriage return/ linefeed sequences are stripped out of the returned string.

If this method times out before the end-of-line (linefeed) is received, no error is generated. The return value contains those characters that were received before the timeout.

If you're using the ReadLine method to read incoming data from an external application (such as stand-alone Visual Basic), set the ProcessDatacomm property to False to prevent Reflection from reading and processing characters between calls to Reflection methods.


Timeout Argument Type: String
Specifies the amount of time to wait for a linefeed to be received. The string is specified in HH:MM:SS.hh format. If this argument is omitted or is empty (""), Reflection waits indefinitely if a linefeed is not received.

Options Argument Type: Enumeration
Specifies additional, non-default behavior for the method. There are two options for this method:


 Indicates that the string should not be translated from the host character set into the PC character set.


 Specifies that incoming characters should not be displayed in the terminal window.

 To combine the two options, use the addition operator: rcNoTranslation + rcNoDisplay.

SawEndOfLine Argument Type: Boolean
Receives True if the end-of-line (linefeed) character was received before the timeout occurred, and False otherwise.


LineRead Return type: String
The line read from the host (not including carriage return/linefeed characters).



image\jump.gif Keyword Index

image\popup.gif Related Topics

image\popup.gif Reflection products that use this command