Vote UpVote

Delphi – for … in on enumerated data types

The Wiert Corner – I like enumerated type a lot. The allow you to perfectly describe what the members of such a type actually mean, much more readable than a bunch of integer constants! Given an enumerated type like TTraphicLightColors type TTraphicLightColors = (Red, Orange, Green); I always wondered why  - since the for ... in statement was added to the structured statements part of the Delphi language – it is not possible to use a for … in statement like this. var TraphicLightColor: TTraphicLightColors; begin try for TraphicLightColor in TraphicLightColor do ...
Favorite? Off-Topic? jpluimers @ 2009-10-27 06:00


Visits: 611
Votes: 4
Favorites: 1
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Alister Christie
JC Chu
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News


Please login or register to use this functionality.
(click on this box to dismiss)