As discussed at
https://forum.lazarus.freepascal.org/index.php/topic,55397.0.html, this
compiles and works well:
{$MACRO ON}
{$if SizeOf(byte) = 1}
WriteLn('SizeOf(byte) = ', SizeOf(byte));
{$endif}
however this does not compile:
{$MACRO ON}
{$define TMyOrdinalType := byte}
{$if SizeOf(TMyOrdinalType) = 1}
WriteLn('SizeOf(TMyOrdinalType) = ', SizeOf(TMyOrdinalType));
{$endif}
and creates this compilation error: Identifier not found "TMyOrdinalType"
Looking at the documentation
https://www.freepascal.org/docs-html/prog/progsu29.html I was expecting {$if
SizeOf(TORDINALTYPE) = 1} to compile. If I am reading it correctly, then I
should either file a documentation bug report to make documentation more clear,
or a feature bug report where this $IF example is not behaving as it should.
Which should I report?
_______________________________________________
fpc-devel maillist - [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel