[fpc-pascal]Nul sub-routine
IoDream
IoDream at ifrance.com
Wed Sep 20 23:14:12 CEST 2000
Hello to all,
I would like to know if we can define a sub-routine to be nul, so that
when compiling this routine hold no byte at all. This is what a macro do,
but macros aren't implemented yet in FPC.
This could be used, for example, in a C-like "assert" function that when
NDEBUG is defined the function is inserted, and when it isn't the function
waste no space. I include a DJGPP version of the function prototype.
In other words; this is equivalent to the lines below, but is easier to
write, and looks much better in your source:
{$IFDEF NDEBUG}
Assert(blabla);
{$ENDIF}
Best Regards,
IoDream.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: assert.h
Type: application/octet-stream
Size: 530 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20000920/93a75578/attachment.obj>
More information about the fpc-pascal
mailing list