try this
var
bob: (A,C,B);
begin
for bob := a to b do
begin
if bob = a then showmessage('a');
if bob = b then showmessage('b');
if bob = c then showmessage('c');
end;
end;
It works for me
-----Original Message-----
From: Terry Johnson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 28 January 2003 2:53 p.m.
To: Multiple recipients of list delphi
Subject: [DUG]: Attributes of enumerations
Suppose you have an enumeration like ...
type
lights = (red,orange,green);
In Ada, you can write something like
for colour:=lights'first to lights'last do ...
where lights'first = red, and lights'last=green. Anything like this in
Delphi? I've looked, but can't find anything...
Cheers,
Terry
---------------------------------------------------------------------------
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"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
---------------------------------------------------------------------------
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"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/