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

Reads one or more lines of text from the IOHandler into a TIdStrings instance.

procedure ReadStrings(
    ADest: TIdStrings; 
    AReadLinesCount: Integer = -1
Stores lines of text read from the IOHandler.
Number of lines of text expected from the IOHandler. 

ReadStrings is a procedure used to read one or more lines of text from the IOHandler, and stores the values in the AValue argument. 

AReadLinesCount indicates the number of lines of text expected from the IOHandler. When AReadLinesCount contains 0 (zero) or a negative value, the number of lines of text is read from the IOHandler as an Integer value. Otherwise, the value in AReadLinesCount must be a positive Integer value supplied by the calling procedure. 

ReadStrings calls ReadLn for the number of iterations indicated in AReadLinesCount, and adds each line of text to the string list in ADest. 

Use ReadChar, ReadBytes, or ReadString to access data in the IOHandler buffer as the requested data type.

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