[Lazarus] Build Number

waldo kitty wkitty42 at windstream.net
Fri Jul 23 10:59:04 CEST 2010


On 7/23/2010 04:17, Sven Barth wrote:
> Hi!
>
> Am 23.07.2010 00:58, schrieb waldo kitty:
>> on the surface, this would seem to be similar to the C style
>> preprocessor stuff that takes "macros" like __DATE__ and __TIME__ and
>> converts them to the current date and time and writes them into the
>> object code... i did something like this for TP6/BP6 way back in the
>> day... set those as consts in an include that was rewritten each time by
>> my preprocessor before the command line compiler was called... actually
>> using them (ie: forcing them to be included in the binary) required that
>> at least one const string be used in the execution of the program...
>> these didn't have to be used in the code but they were included such
>> that one could see them in the binary when it was viewed via a hex
>> editor/viewer...
>
> Did you know about this:

whoa! wow!! how about that! i'd have never thought to even try something like 
that... it looks the same as including environment variables in 4DOS/4OS2/4NT 
with the percents on both sides like that :) :) :)

i guess i'm going to have to figure out how to separate FPC from Lazarus so as 
to get a better base of FPC's offerings before attempting to dance the GUI 
dance... getting them in one package is nice except that one can get confused 
about what it available in Lazarus vs what is available in FPC...

i really do wish that the help files would come preinstalled in the available 
installation packages... installing on win and *nix leaves a lot to be desired 
as far as the built in F1 help stuff goes... especially when one has to go in 
and fill in the blanks with some unknown directory value(s) that are not readily 
apparent :? i won't even mention having a PDF of the documentation as i know 
that there's still work going on for the german language book that i hope will 
be released in english before too long...

thanks for sharing that :) if it were only that easy to grab other values like 
the compilation version number originally spoken of in this thread ;)

>
> ===
>
> program Foo;
>
> {$apptype console}
>
> begin
> Writeln({$I %DATE%} + ' ' + {$ %TIME%});
> Readln;
> end.
>
> ===
>
> Output:
>
> 2010/07/23 10:13:40
>
> ===
>
> It's documented here:
> http://www.freepascal.org/docs-html/prog/progsu38.html#x45-430001.1.38
>
> Regards,
> Sven
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>





More information about the Lazarus mailing list