[fpc-pascal]Nul sub-routine

IoDream IoDream at ifrance.com
Sat Sep 23 23:48:55 CEST 2000


   OK, that's good ! Thanks !

   But I would like to do the same with some profiling subroutines. You
understand: if I compile with the symbol PROFILE defined all the profiling
code is compiled, and if the symbol is undefined then no extra code is
generated.

   Any idea ?

----- Original Message -----
From: Florian Klaempfl <Florian.Klaempfl at gmx.de>
To: <fpc-pascal at deadlock.et.tudelft.nl>
Sent: Wednesday, September 20, 2000 11:37 PM
Subject: Re: [fpc-pascal]Nul sub-routine


> IoDream wrote:
> >
> >           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}
> >
>
> FPC supports Assert. If you compile without -Sa it is ignored.
>
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal



 
______________________________________________________________________________
Vous avez un site perso ?
2 millions de francs à gagner sur i(france) !
Webmasters : ZE CONCOURS ! http://www.ifrance.com/_reloc/concours.emailif






More information about the fpc-pascal mailing list