On Sun, Sep 18, 2011 at 9:19 AM, Marco van de Voort <mar...@stack.nl> wrote: > In our previous episode, Fl?vio Etrusco said: >> > http://delphi.wikia.com/wiki/FreePascal_detection_and_versioning >> > >> > a typical usage: >> > >> > {$if FPC_FULLVERSION> 20204} >> > ? // means greater than 2.2.4 here >> > ?{$ifndef} >> > >> >> Not wanting to hijack the thread but, why isn't there a way to print >> macro values? (There isn't, is it?) > > No. http://bugs.freepascal.org/view.php?id=12935 > > I still think this is a good thing, mostly because this is a way to get > versions etc embedded in the program into the binary without going through > an includefile processor. > > so > > fpc -dfreebsdversion:=`uname -r` > > and then > {$i %freebsdversion%} > > According to Jonas it can also be done via the environment, and for me that > was enough back then (which is why the report is closed). But in retrospect > that is fine for commandline, but harder for IDE usage. (which often allows > to set additional cmdline options, but not specify the environment, > specially not on all targets) > _______________________________________________
Thanks for the information and tips. I hadn't thought about using environment variables, maybe I'll add it to Lazarus :) Best regards, Flávio _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal