[fpc-pascal] Proper preprocessor?
Florian Klämpfl
florian at freepascal.org
Sat Jun 23 09:56:38 CEST 2018
Am 23.06.2018 um 04:30 schrieb Ryan Joseph:
>
>
>> On Jun 23, 2018, at 3:13 AM, Florian Klämpfl <florian at freepascal.org> wrote:
>>
>> {$macro on}
>>
>> {$define TypeStr:=specialize _TypeStr}
>>
>> begin
>> Writeln(TypeStr<TMyRecord>);
>> end.
>>
>>
>> ;)
>
> You have a good sense of humor about it at least. :)
>
> So you can in fact print types, albeit with a more verbose syntax and by using another meta-programming tactic, e.g. generics.
>
Nobody said meta-programming is bad. But the right approach should be used.
More information about the fpc-pascal
mailing list