[fpc-pascal] Scoped enums and inferred types

Michael Van Canneyt michael at freepascal.org
Wed Feb 21 10:45:23 CET 2018



On Wed, 21 Feb 2018, Martok wrote:

>> 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.

I was waiting for this reply from you. You didn't disappoint ;)

Michael.



More information about the fpc-pascal mailing list