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

Retrieves definitions from the DICT server.

procedure Define(
    const AWord: String; 
    AResults: TIdDefinitions; 
    const AGetAll: Boolean = True
); overload;
Parameters 
Description 
AWord 
Word definition to search for in the databases.
 
AResults 
Container for definitions returned by the DICT server.
 
AGetAll 
Indictes if all word matches are included in the results. 

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. 

AResults is the TIdDefinitions instance used to store definitions retrieved from the DICT server. 

AGetAll indicates that all word matches in all databases will be included in the definitions returned to the client. When AGetAll contains False, a single match from all databases is returned. 

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.