Topic Path: Symbol Reference > Classes > TIdIOHandler Class > TIdIOHandler Methods > InputLn Method
TIdIOHandler.InputLn Method

Reads a line of data from the connection.

function InputLn(
    const AMask: String = ''; 
    AEcho: Boolean = True; 
    ATabWidth: Integer = 8; 
    AMaxLineLength: Integer = -1
): String; virtual;
Character to echo instead of the value read from the connection.
Indicates if echoing is enabled.
Number of space characters to use to represent a TAB.
Maximum line length allowed for data read from the connection. 

String - Values read from the IOHandler connection.

InputLn is a virtual String function used to read a single line of data from the connection for the IOHandler. 

AMaxLineLength indicates the maximum line length allowed for data read from the connection. When AMaxLineLength contains -1, the value in MaxLineLength is used for the maximum line length. 

InputLn reads data one character at a time from the connection for the IOHandler, and accumulates values read from the connection as the return value for the function. Trailing CR and LF characters are truncated from the return value. 

When AEcho is True, values read from the connection are written back to the connection, with special handling provided for the TAB and BACKSPACE characters. 

TAB characters are echoed as a string of CHAR32 values with the length indicated in ATabWidth when ATabWidth contains a positive non-zero value. 

BACKSPACE characters cause the last value read from the connection to be removed from the accumulated return value. When AEcho is True, the BACKSPACE character is echoed with additional CHAR32 and BACKSPACE values. 

When AMask is specified, the AMask string is sent to the peer for each character received instead of the actual characters read from the connection. 

InputLn is useful when obtaining data from a user such as username, passwords, and commands.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.