Page 1 of 1

[Implemented] New compiler constant: #PB_Compiler_Name

Posted: Fri Jun 29, 2007 11:40 pm
by blueznl
We do have #PB_Compiler_File, but what I would like to add is 'module testing'. I would like to test my include files by 'running' them, ie. I need to know if they are included or directly run. This could be accomplished by the following:

Code: Select all

Procedure Test()
  ;
  ;
  CompilerIf #PB_Compiler_Name = "x_lib.pb"
    ;
  EndCompilerIf
EndProcedure
The current implementation forces me to include a complete path, which I obviously don't want :-)

Re: New compiler constant: #PB_Compiler_Name

Posted: Sat Jun 30, 2007 11:13 am
by traumatic
I got the idea but I'd expect #PB_Compiler_Name to output "Purebasic 4.xx" or something.
Maybe #PB_Compiler_Module or the like would fit better. Just my 2ct.

Posted: Sat Jun 30, 2007 5:22 pm
by blueznl
You may be right. I was just trying to match the current #PB_Compiler_File and #PB_Compiler_Path statements.