Recent

Author Topic: [SOLVED]Are there some pre-defined variables such as __line__ like C languange ?  (Read 136 times)

kinlion

  • New member
  • *
  • Posts: 32
  • I Love Lazarus
These variables are useful.
For examples:
  __build_time__ can be shown to indicate whethor the exe-file is the latest version. (The version number is not well-understood to none-programmer).
  __file__, __line__ can be used in debug out for convinent.
« Last Edit: December 08, 2018, 07:48:20 am by kinlion »
Lazarus 1.8.4 / FPC 3.0.4 / SVN 57972
On Win10 X64, have to compile for Win32

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6608
Re: Are there some pre-defined variables such as __line__ like C languange ?
« Reply #1 on: December 07, 2018, 08:31:51 am »
Yes, they are documented in the manual: https://www.freepascal.org/docs-html/prog/progsu41.html

Afaik the next release will have some more. Those are not yet in the above list.

kinlion

  • New member
  • *
  • Posts: 32
  • I Love Lazarus
Re: Are there some pre-defined variables such as __line__ like C languange ?
« Reply #2 on: December 07, 2018, 04:38:15 pm »
Yes, they are documented in the manual: https://www.freepascal.org/docs-html/prog/progsu41.html

Afaik the next release will have some more. Those are not yet in the above list.

Thanks a lot. That's very useful.
Lazarus 1.8.4 / FPC 3.0.4 / SVN 57972
On Win10 X64, have to compile for Win32