You could create a string with all possibilities at regular intervals,

Possibilities := 'Fred      Jim       Wally     Elephants ' ;

then

case pos(MyString, Possibilities) div 10 of
  0:
  1...
end ;

Dave
----- Original Message -----
From: "Reginald Ebenezer" <[EMAIL PROTECTED]>
To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
Sent: Thursday, June 07, 2001 6:45 PM
Subject: [DUG]: String in Case Statement


> Hi
>
>   I understand that string cannot be used in a Case statement because
> delphi does not support it. A work around for the same is using an If
> <Condition> then. I feel this is not a very neat substitute for Case
> Statement. Can any one suggest some other way of doing the same. Thanks
> in advance.
>
> Regards
> Ebenezer
> --------------------------------------------------------------------------
-
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
>

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"

Reply via email to