Am 25.02.2018 12:14 schrieb "Mark Morgan Lloyd" < markmll.fpc-de...@telemetry.co.uk>:
On 25/02/18 10:30, Florian Klämpfl wrote: > Am 25.02.2018 um 11:12 schrieb Mark Morgan Lloyd:> On 25/02/18 02:15, Ozz > Nixon wrote:>> {$MACRO ON}>> {$DEFINE _CTASSERT(X,Y,Z):=assert(x=y,z);}>> > Begin _CTASSERT(1,1,'Constant failed.');end.> > I don't believe > parameters are supported :-(> > Why so sad? They are not supported on purpose :) > Because it messes up what the OP was trying to do, which is not necessarily something to feel good about. Yes, we definitely feel good about this, because we don't *want* parameter support in FPC's macro handling. What the author wants to achieve here can also be done using a procedure marked as inline. As long as the unit containing the procedure is rebuild when assertions are enabled or disabled everything will work as expected and even the whole call will disappear if it isn't needed. Much cleaner than a preprocessor. Regards, Sven
_______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel