Page 1 of 1

[Implemented] Compiler constants #PB_Compiler_IsMain

Posted: Mon Jun 28, 2010 1:24 pm
by helpy
Hallo PB Team,

It would be helpful to know at compile time if a file is used as include or as main file:

Suggestions:
  • #PB_Compiler_Main ... is #True if source file is used as main file
  • #PB_Compiler_Include ... is #True if source file is used as include file
Other possibilities:
  • #PB_Compiler_IsMain
  • #PB_Compiler_UsedAsMain
  • #PB_Compiler_IsInclude
  • #PB_Compiler_UsedAsInclude
greetings to the great PB team.

cu,
guido

Re: Compiler constants #PB_Compiler_IsMain or similar ...

Posted: Mon Jun 28, 2010 4:27 pm
by blueznl
Yep, this one I would like as well. It would allow to put 'test' procedures inside an include file, which would not be included if the include is an include... euh... hope that makes sense :-)

Re: Compiler constants #PB_Compiler_IsMain or similar ...

Posted: Mon Jun 28, 2010 4:40 pm
by ts-soft
blueznl wrote: inside an include file, which would not be included if the include is an include... euh...
Yes, i agree :D