[fpc-pascal] A better way?
Ryan Joseph
ryan at thealchemistguild.com
Fri Apr 15 13:26:21 CEST 2016
> On Apr 15, 2016, at 5:34 PM, Tony Whyman <tony.whyman at mccallumwhyman.com> wrote:
>
> Just remembered, FPC also supports macros - see http://www.freepascal.org/docs-html/prog/progse5.html
>
> I haven't tested it, but you should be able to do
>
> {$MACRO On}
>
> {$DEFINE aClassBObject:=TClassB(FClassBObject) }
>
> and then use aClassBObject instead of the coercion.
I remember trying to doing pre-parser type things using macros but the think the conclusion is they don’t work by just replace text like in C.
I’m trying an example like this but getting errors and even crashing the compiler (seg faults).
Regards,
Ryan Joseph
More information about the fpc-pascal
mailing list