Revision 826641

Go back to digest for 6th July 2008

Other in Educational

Jason Harris committed changes in /branches/kstars/unfrozen/kstars/kstars/ksplanetbase.h:

Interesting-yet-annoying C++ Trivia.If you declare an enum thusly.typedef enum { MERCURY, VENUS, MARS, JUPITER, SATURN, URANUS, NEPTUNE, PLUTO, SUN, MOON } PLANET.

There's *no* guarantee that the integers assigned to each item will be consecutive.
They *usually* are, but just for fun, sometimes they aren't!

In my case, the first 9 items were assigned consecutive numbers 0-8, and then the MOON item was assigned to 12!.

That's the last time I trust g++ to count to 9, I guess...

File Changes

Modified 1 files
  • /branches/kstars/unfrozen/kstars/kstars/ksplanetbase.h
1 files changed in total