Programming with Reflection

image\rwnprg32.gif ReadLine method

 

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

 

Description

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.

Arguments

Timeout Argument Type: String
Optional
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
Optional
Specifies additional, non-default behavior for the method. There are two options for this method:

 rcNoTranslation

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

 rcNoDisplay

 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
Optional
Receives True if the end-of-line (linefeed) character was received before the timeout occurred, and False otherwise.

Return

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