POV-Ray : Newsgroups : povray.programming : enum { SOMETHING = 'Thing' } ? : Re: enum { SOMETHING = 'Thing' } ? Server Time
5 Jul 2024 15:07:01 EDT (-0400)
  Re: enum { SOMETHING = 'Thing' } ?  
From: Thorsten Froehlich
Date: 5 Feb 2004 07:59:11
Message: <40223e1f@news.povray.org>
In article <402230f2$1@news.povray.org> , "AngleWyrm" 
<no_### [at] hotmailcom> wrote:

> * I've overlooked something totally obvious, and should go get another cup
> of coffee

Bingo! ;-)  If you want to create programs that can exchange data including
enumerations, you absolutely have to assign each enumeration a distinct
value.  Otherwise all programs would have to be updated each time
enumeration value if added or removed.  The one kind of value that is on the
one hand easy to read when debugging, and on the other hand will result in a
fairly unique enumeration value is a four character constant.  That is also
why you find them used in many operating system programming interfaces.

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.