[fpc-devel] MACRO - correct syntax?

Ozz Nixon ozznixon at gmail.com
Sun Feb 25 14:31:34 CET 2018


Thank you Sven! I saw all of the threads on this topic in 2011, but, figured I would ask here if it had changed, and I was just doing it wrong. We are in the process of porting Minix 3 source to Free Pascal (Andrew T. tells me it can’t be done, and I know FPC can handle it). I just wanted to keep the C macros close so he can see I did an automated conversion not a logic conversion.

 

Thanks to everyone else on this topic, but “not supported” is fine with me.

Ozz

 

From: fpc-devel [mailto:fpc-devel-bounces at lists.freepascal.org] On Behalf Of Sven Barth via fpc-devel
Sent: Sunday, February 25, 2018 3:17 AM
To: FPC developers' list <fpc-devel at lists.freepascal.org>
Cc: Sven Barth <pascaldragon at googlemail.com>
Subject: Re: [fpc-devel] MACRO - correct syntax?

 

Am 25.02.2018 03:01 schrieb "Ozz Nixon" <ozznixon at gmail.com <mailto:ozznixon at gmail.com> >:


{$MACRO ON}

{$DEFINE _CTASSERT(X,Y,Z):=assert(x=y,z);}

Begin
   _CTASSERT(1,1,'Constant failed.');
end.

 

Macros with arguments are not supported. 

 

Regards, 

Sven 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20180225/ae33d6de/attachment.html>


More information about the fpc-devel mailing list