Link to home
Start Free TrialLog in
Avatar of etiennedemers
etiennedemersFlag for Canada

asked on

Pascal equivalent of VB Select/case

Hi Experts,

its been a while since I have used Delphi and I feel silly for asking such a basic question but how the heck do you do a simple select case?

I have a function that returns a string and want to do something depening of the value:

IE

Select myString Case

'A': do this
'B': do that
else: do something else

end;

Thanks,
E.
Avatar of etiennedemers
etiennedemers
Flag of Canada image

ASKER

I try the Case command but I get Error E2001: Ordinal type required and its a string I want to use...
ASKER CERTIFIED SOLUTION
Avatar of Dan Craciun
Dan Craciun
Flag of Romania image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you Dan.