Topic Path: Symbol Reference > Classes > TIdReplies Class > TIdReplies Methods > Add Method > Add Method (Integer, string)
TIdReplies.Add Method (Integer, string)

Add a new reply to the collection.

function Add(
    ACode: Integer; 
    AText: string
): TIdReply; overload;
Textual values for the reply. 
Numeric value for the reply.

TIdReply - Reply added to the collection.

Add is an overloaded TIdReply function used to add a new item to the collection. 

ANumericCode is the numeric value to use in the TIdReply created in the collection. 

AText is the textual value to use in the TIdReply created in the collection. 

Add calls Find to determine if the numeric code is already in use in the collection. If the numeric value is found, a new TIdReply instance is not created, and the return value from Add is Nil. If the numeric value is not found, a new TIdReply item is created and its contents are updated using TIdReply.SetReply with the values specified in ANumericCode and AText.


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