#PB_Compiler_File + #PB_Compiler_FilePath

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
AND51
Addict
Addict
Posts: 1040
Joined: Sun Oct 15, 2006 8:56 pm
Location: Germany
Contact:

#PB_Compiler_File + #PB_Compiler_FilePath

Post by AND51 »

Hello!

First, thank you for implementing #PB_Compiler_FilePath.
But wouldn't it be better to make #PB_Compiler_File returning file name only? "File" suggests to return file name only.
If someone wants both, he can easily use #PB_Compiler_FilePath+#PB_Compiler_File.


In the past, I was searching for a simple way to create an onError-procedure which returns modulename+linenumber. I had to use GetFilePart(#PB_Compiler_File). But this is the wrong way, as the path musn't be saved within the final EXE. Currently, there is still now way to just implement the filename instead of the whole path.

I hope, you understand what I'm talking about...?
PB 4.30

Code: Select all

onErrorGoto(?Fred)