tags:

views:

413

answers:

3
+3  Q: 

Delphi and enum

Has Delphi analog of enum in C?

+3  A: 

Have a look at

Enumerations, SubRanges and Sets

astander
+7  A: 

Yes. Check out the first portion of Delphi Basics: Enumerations, SubRanges, and Sets.

Justin Niessner
+16  A: 

Yes, Delphi has the following enumerated type construction:

type
  TDigits = (dgOne, dgTwo, dgThree <etc>);

Also, like in C, each symbol of an enumerated type may have a specified value, like this:

type
  TDigits = (dgOne = 1, dgTwo, dgThree <etc>);
da-soft
There should be a LMGTFY button, and a badge awarded to people like Hacker, who don't know how to google.
Warren P