Thanks Ager and Zhirov, the macros work! StackOverflow<http://stackoverflow.com/questions/7759667/can-pascal-units-be-compiled-as-executables/7774138#7774138>
RosettaCode <http://rosettacode.org/wiki/Scripted_main#Free_Pascal> Cheers, Andrew Pennebaker www.yellosoft.us On Fri, Oct 14, 2011 at 2:33 PM, Vladimir Zhirov <vvzh.li...@gmail.com>wrote: > Andrew Pennebaker wrote: > > Thanks, the conditional execution code helps a lot. Does > > $IFDEF look for an environment or Makefile variable? > > No, it looks for previously defined variables. You can define > variables using -dMyVar command line switch when running the > compiler, or {$DEFINE MyVar} in source code. It is possible > to use the first approach in makefiles. > > _______________________________________________ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-pascal >
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal