How to read #PB_Editor_CompileCount in the program

Just starting out? Need help? Post your questions and find answers here.
User avatar
bfernhout
Enthusiast
Enthusiast
Posts: 125
Joined: Mon Feb 26, 2018 10:41 pm
Location: Netherlands
Contact:

How to read #PB_Editor_CompileCount in the program

Post by bfernhout »

when i run a program i want to know how many times the compiler has compiled the program that i am testing.
I want to read this number in the code from the compiler options and display it during startup. I had i once but i cant find it how to do it.

Is there a way or can somebody help me with this code.
just using

Code: Select all

#PB_Editor_CompileCount
id not working
From my first self made computer till now I stil like computers.
User avatar
Paul
PureBasic Expert
PureBasic Expert
Posts: 1251
Joined: Fri Apr 25, 2003 4:34 pm
Location: Canada
Contact:

Re: How to read #PB_Editor_CompileCount in the program

Post by Paul »

Under Compiler Settings, enable this Constant
Image Image
User avatar
bfernhout
Enthusiast
Enthusiast
Posts: 125
Joined: Mon Feb 26, 2018 10:41 pm
Location: Netherlands
Contact:

Re: How to read #PB_Editor_CompileCount in the program

Post by bfernhout »

Sorry wrong awnser.

I already enable this, but is there a way to read this in the program itself.

Code: Select all

Global BuildNumber.i = #PB_Editor_CompilerCounter
Result in a error.
From my first self made computer till now I stil like computers.
User avatar
Josh
Addict
Addict
Posts: 1183
Joined: Sat Feb 13, 2010 3:45 pm

Re: How to read #PB_Editor_CompileCount in the program

Post by Josh »

bfernhout wrote:

Code: Select all

Global BuildNumber.i = #PB_Editor_CompilerCounter
#PB_Editor_CompileCount, not
#PB_Editor_CompilerCounter
sorry for my bad english
User avatar
bfernhout
Enthusiast
Enthusiast
Posts: 125
Joined: Mon Feb 26, 2018 10:41 pm
Location: Netherlands
Contact:

Re: How to read #PB_Editor_CompileCount in the program

Post by bfernhout »

Thanks that was it.

I made 2 errors in the Constant i put a R and ER in
thanks
From my first self made computer till now I stil like computers.
Post Reply