On Fri, Jun 22, 2018 at 6:47 PM, Sven Barth via fpc-pascal <fpc-pascal@lists.freepascal.org> wrote: > >> [...] > > Why not simply test it? > > That said you can also do this: > > === code begin === > > {$macro on} > > {$ifdef debug} > {$define foo := foo_debug} > {$else} > {$define foo := foo_run} > {$endif} > > uses > foo; > > begin > foo.SomeFunc; > end. > > === code end === > > Though more often than not such things are done by simply using a different > set of units with the same names in a different unit path.
Because I was on the road, without my laptop, and I didn't want to forget this :) And your way is even better, thank you. Best regards, Marcos Douglas _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal