Delphi Programming Tutorial #57 - ScopedEnums

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
836 views
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Mar 22, 2011

In this video Alister Christie looks at the $SCOPEDENUMS compiler directive when using enumerated types.

Category:

Howto & Style

Tags:

License:

Standard YouTube License

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (codegearguru)

  • 2nd half of the demo was a bit suspect imho - you are highly unlikely to save the ord() of an enum member directly. Even if you aren't saving the enum member *name* (which you should be doing, of course) you are in any event far more likely to save the Ord() of a variable of a specific enum type, and cast back to that same type when loading from storage. Since variables are typed, the scoping issue of one "foot" obscuring another is highly unlikely to occur in the way shown.

  • @delticsnz I think the point is more that things can go wrong in unusual ways, not that my contrived example is representative of how one should write code in the large. But yes I agree, in most instances Delphi typing will prevent such errors.

see all

All Comments (3)

Sign In or Sign Up now to post a comment!
  • lame video. please post something more interesting.

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more