Page 1 of 1

[Implemented] New constant: #PB_Compiler_FilePath

Posted: Wed Oct 22, 2008 10:34 pm
by helpy
Hello,

Besides the following constant ...

Code: Select all

#PB_Compiler_File     : Full path and name of the file being compiled, useful for debug purpose.
... it would be helpful to have a constant with the full path to the actual file being compiled, ie.: #PB_Compiler_FilePath

With this constant it would be easier to handle nested include files!

Code: Select all

XIncludeFile #PB_Compiler_FilePath + "include_X.pbi"
XIncludeFile #PB_Compiler_FilePath + "..\include_Y.pbi"
cu, guido

Posted: Wed Oct 22, 2008 10:56 pm
by helpy
... aaaah ...

I found a way to do what I want with a little trick (mentioned in a different topic):

Code: Select all

Macro RXIncludeFile
	XIncludeFile #PB_Compiler_File + "\..\" + 
EndMacro

RXIncludeFile "include_X.pbi"
RXIncludeFile "..\include_Y.pbi"
RXIncludeFile "subDir\include_Z.pbi"
This I can use in every source file ... and it is always relative to the source file, where RXIncludeFile is used.

Posted: Fri Oct 24, 2008 7:58 am
by helpy
... a new include command (like the little macro in the post before) would be very helpful:

RXIncludeFile <RelativeFilePath> ... R[elative]XIncludeFile is always relative to the current source file ... this would be a nice and helpful alternative to XIncludeFile.

cu, guido

Posted: Fri Oct 24, 2008 8:14 am
by Kaeru Gaman
I suggest an implementation of some #PB_Compiler_SourcePath
to be used in combination with IncludePath.

would be more consistent than adding a new command.