POV-Ray : Newsgroups : povray.programming : enum { SOMETHING = 'Thing' } ? : Re: enum { SOMETHING = 'Thing' } ? Server Time
3 Jul 2024 05:41:21 EDT (-0400)
  Re: enum { SOMETHING = 'Thing' } ?  
From: AngleWyrm
Date: 5 Feb 2004 07:02:58
Message: <402230f2$1@news.povray.org>
Some possible reasons:
* It may have applied to old code that is no longer a part of the program

* It may have applied to an old plan that was never implemented

* It may have been a method of creating a 'sparse' enum set, to avoid
accidentally refererencing with the wrong kind--But there's a better ways to
catch that mishap:

enum animals {CAT, DOG, MOUSE};
enum colors {RED,GREEN,BLUE};
void MyAnimalFunc( animals eInput ){}; // enum type specified
int main(void)
  MyAnimalFunc( CAT ); // works fine
  MyAnimalFunc( RED ); // compiler gets it: cannot convert 'colors' to
'animals'
}

* It might apply to tools/utilities that reside outside the program

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


Post a reply to this message

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