POV-Ray : Newsgroups : povray.programming : enum { SOMETHING = 'Thing' } ? : Re: enum { SOMETHING = 'Thing' } ? Server Time
5 Jul 2024 14:53:45 EDT (-0400)
  Re: enum { SOMETHING = 'Thing' } ?  
From: AngleWyrm
Date: 6 Feb 2004 04:56:11
Message: <402364bb$1@news.povray.org>
"Thorsten Froehlich" <tho### [at] trfde> wrote in message
news:40223cef$1@news.povray.org...
> In article <40222523@news.povray.org> , "AngleWyrm"
> <no_### [at] hotmailcom> wrote:
>
> > If the enums were given specific values,
>> it was my guess that at some point in the program
>> a comparison to, or usage of those specific values would take place.
>> Makes sense?

> No, nobody would define enums and then not use them.
Have you seen these enum values used somewhere?
This is what I have gone looking, and haven't found them used anywhere.

> Enums are given "names" because those mean more to a human when debugging.
Doesn't your debugger display enums directly?
enum CRITTERS {CAT, DOG, MOUSE};
CRITTERS animal = CAT;
debugger says:" animal = CAT " which is plenty clear enough.
And this works for any external program that uses the header file in which
the enum is defined.

What is gained by saying the variable 'animal', which has a value of CAT,
also has a numerical value that can be translated to 'cat'?


Post a reply to this message

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