Recent

Author Topic: [SOLVED] {$I %FPCVERSION%} What does it mean  (Read 2622 times)

BrunoK

  • Sr. Member
  • ****
  • Posts: 452
  • Retired programmer
[SOLVED] {$I %FPCVERSION%} What does it mean
« on: January 14, 2019, 12:05:02 pm »
I'm trying to figure out what {$I %FPCVERSION%} (like in lazarus ide\AboutFrm line 181)
Code: Pascal  [Select][+][-]
  1.   FPCVersionLabel.Caption:= lisFPCVersion+{$I %FPCVERSION%};
the %FPCVERSION% represents and where it comes from.

Thanks.
« Last Edit: January 16, 2019, 11:07:11 am by BrunoK »

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1186
    • Burdjia
Re: {$I %FPCVERSION%} What does it mean
« Reply #1 on: January 14, 2019, 01:43:06 pm »
It inserts the version number of the FPC compiler as a string to the expression.  You'll get more information in the documentation.

Note that it is different than {$I filename}!
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

BrunoK

  • Sr. Member
  • ****
  • Posts: 452
  • Retired programmer
Re: [SOLVED] {$I %FPCVERSION%} What does it mean
« Reply #2 on: January 16, 2019, 09:43:07 am »
@Ñuño_Martínez thanks for the first link, I couldn't find it.

Let's say solved.

I have branched 3.0.4 for some tests to a private 3.0.6 branch. I managed to get most 3.0.4 version return to reply 3.0.6 except that  {$I %FPCVERSION%} that still returns 3.0.4.

Will have to dig/hunt a bit more.

PascalDragon

  • Hero Member
  • *****
  • Posts: 5446
  • Compiler Developer
Re: [SOLVED] {$I %FPCVERSION%} What does it mean
« Reply #3 on: January 17, 2019, 12:49:58 pm »
Simply search for 'FPCVERSION' (including the quotes) in the compiler sources which will lead you to a case-clause that uses the version_string function which in turn uses the version_nr, release_nr and patch_nr constants in unit version of the compiler.

BrunoK

  • Sr. Member
  • ****
  • Posts: 452
  • Retired programmer
Re: [SOLVED] {$I %FPCVERSION%} What does it mean
« Reply #4 on: January 17, 2019, 03:02:00 pm »
@PascalDragon

Thanks.

Indeed it is all there, and is constructed from version_nr+'.'+release_nr+'.'+patch_nr which I had already changed.

It seems that I mixed up my versions. Will figure it out.

 

TinyPortal © 2005-2018