> I doubt that many would be using scopedenums for that.
Isn't that what they're for?

{$SCOPEDENUMS ON}
type
  TTileSortingFlag = (Static,
                      Ramp,
                      Ignore,
                      Particle,
                      Floor,
                      Flat,
                      Container,
                      OnRamp,
                      BufferStatic,
                      BufferDynamic
                      );

As a side note, Ryan: if you need to interoperate with other languages, using
enums is dangerous. FPC has different enum storage semantics from most other
compilers, and will happily drop you into "undefined" behaviour.
Example from C# syntax:
   enum Day : byte {Sat=1, Sun, Mon, Tue, Wed, Thu, Fri};
is _not_ translated as
   {$PACKENUM 1}
   Day = (Sat=1, Sun, Mon, Tue, Wed, Thu, Fri);
Instead, write
   {$PACKENUM 1}
   Day = (_low=low(Byte), Sat=1, Sun, Mon, Tue, Wed, Thu, Fri, _hi=high(Byte));


Regards,
Martok

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to