Hi All,
I know there aren't many Pascal programmers around anymore, but I thought I' ask a question here, as I've been unable to find any info on the internet.
I've been writing some programs in Pascal, using Lazarus 1.8.2 with FPC 3.0.4, running under Ubuntu 18.04.
Is there a way to use the Lazarus version number set up in the Project Options -=> Version Info, as a variable in the code?
Right now, I've just been changing the version number in both Lazarus, and a a CONST in my programs. There have been a couple times, where I forget one o them, and it causes confusion, at least on my part... :)
Hi All,
I know there aren't many Pascal programmers around anymore, but I
thought I'd ask a question here, as I've been unable to find any info
on the internet.
I've been writing some programs in Pascal, using Lazarus 1.8.2 with
FPC 3.0.4, running under Ubuntu 18.04.
Is there a way to use the Lazarus version number set up in the Project Options -=> Version Info, as a variable in the code?
Right now, I've just been changing the version number in both Lazarus,
and as a CONST in my programs. There have been a couple times, where I forget one of them, and it causes confusion, at least on my part... :)
Thanks for any assistance.
Is there a way to use the Lazarus version number set up in the Project Options -=> Version Info, as a variable in the code?
Dan, take a look here: http://forum.lazarus.freepascal.org/index.php?topic=1243 5.0
Vince Coen wrote to Black Panther <=-
Is there a way to use the Lazarus version number set up in the Project Options -=> Version Info, as a variable in the code?
If you use the configure;make build facilty you can create version,
build numbering within and just change the vars in configure.in before running the build script.
AS for the info in a program is this for pickup during running or at
the build stage. If the later that is simple enough even if you issue a export version-var before running in a script.
If the former you will need to check the fpc docs to see if there is a function
for it or write your own or again use an exported vars for your program
to pick up.
I do use the developed program version for displays and the printed reports but
the make script does make use of the compiler version sometimes but not often as I am more concerned with the platform.
Is there a way to use the Lazarus version number set up in the Project Options -=> Version Info, as a variable in the code?
You're quite welcome!http://forum.lazarus.freepascal.org/index.php?topic=1243 5.0
How did I not see that in my searching? Thank you.
I figure I'm not doing too bad, since I've never had any training in Pascal. Everything I've done has been self-taught over the last year. I've been so grateful there are sites like www.freepascal.org... ;)
mark lewis wrote to Black Panther <=-
On 2018 Jun 11 19:53:20, you wrote to All:
Is there a way to use the Lazarus version number set up in the Project Options -=> Version Info, as a variable in the code?
do you mean for something like this??
myProgram DEBUG version 0.7.7.3 [2015/03/29 04:00:54]
Compiled with FPC 2.6.4 for OS2 running on i386
Is there a way to use the Lazarus version number set up in the Project
Options -=> Version Info, as a variable in the code?
do you mean for something like this??
myProgram DEBUG version 0.7.7.3 [2015/03/29 04:00:54]
Compiled with FPC 2.6.4 for OS2 running on i386
I was actually looking for a way to use the program version number
that is under 'Project Options' then 'Version Info'.
I was able to find the information I needed thanks to Gene's reply.
Thank you though. :)
myProgram DEBUG version 0.7.7.3 [2015/03/29 04:00:54]
prog_ver + ' [' + {$I %DATE%} + ' ' + {$I %TIME%} + ']');
Sysop: | altere |
---|---|
Location: | Houston, TX |
Users: | 67 |
Nodes: | 4 (0 / 4) |
Uptime: | 05:10:40 |
Calls: | 767 |
Calls today: | 1 |
Files: | 7,740 |
Messages: | 295,267 |