Topic Path: Symbol Reference > Classes > TIdDICT Class > TIdDICT Methods > Define Method > Define Method (String, String, TIdDefinitions)
ContentsIndexHome
PreviousUpNext
TIdDICT.Define Method (String, String, TIdDefinitions)

Retrieves definitions from the DICT server.

procedure Define(
    const AWord: String; 
    const ADBName: String; 
    AResults: TIdDefinitions
); overload;
Parameters 
Description 
AWord 
Word definition to search for in the database.
 
ADBName 
Database to search for matching word definitions.
 
AResults 
Container for definitions returned by the DICT server. 

Define is an overloaded method used to implement the DICT DEFINE command. Define performs a lookup for the definition of the specified word in the databases on the DICT server. 

AWord indicates the word to lookup in the databases on the DICT server. 

ADBName indicates the database to search for matching word definitions. 

AResults is the TIdDefinitions instance used to store definitions retrieved from the DICT server. Define clears any exisiting definitions stored in the AResults argument. 

Define sends the DICT DEFINE command using the arguments indicated in AWord and ADBName. 

Define will normally result in the following status codes being returned to the client: 

 

Code 
Description 
552 
No match 
150 
n definitions retrieved - definitions follow 
151 
word database name - text follows 
250 
ok (optional timing information here) 

 

Definitions returned with response code 151 are captured and stored in the AResults.

TIdDICT.Define 

TIdDefinitions 

TIdDefinition

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