var
        l:lights;

        for l:=Low(lights) to High(lights) do...

HTH

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Terry Johnson
Sent: Tuesday, January 28, 2003 2:53 PM
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/

Reply via email to