Page 2 of 2
Re: Working out Include Path issues
Posted: Mon Mar 17, 2014 12:25 pm
by luis
PB wrote:
Is that not what we're discussing?
No, what you are showing works
despite the way PB implements its includefile statement since it's the simplest, direct way to use it, what discussed here does not work
because PB implemented its includefile statement that way
If you follow the thread, my explanation in this and in the links I posted you cannot miss it.
Especially this example cannot be more clear ->
http://www.purebasic.fr/english/viewtop ... 24#p367924
The key is PB looks for the file to include not relative to the path of the file containing the include statement, but relative to the path on the MAIN (M A I N) source file, the one you start the compilation from. In your simple case this it not a problem.
In a not trivial case, like the one in the link above, it is.
As I said many times IMO this was a bad design choice, saved only by the fact we have a way around it thanks to that PB constant.
Re: Working out Include Path issues
Posted: Mon Mar 17, 2014 12:31 pm
by PB
> Especially this example cannot be more clear ->
http://www.purebasic.fr/english/viewtop ... 24#p367924
Ohhhhhhhh, I finally see the light.

I'm getting so old.

Re: Working out Include Path issues
Posted: Mon Mar 17, 2014 1:46 pm
by Zach
Tenaja wrote:Zach wrote:No. It's a strange habit I picked up from somewhere, probably another programming language and I tend to use it as it looks aesthetically pleasing to me. Its just an include statement. And they don't seem to influence it or cause bugs in any way, as I've tested it by removing all of them.
This must be some sort of IDE/compiler bug with path parsing.... or a VERY poor design choice
It is most likely neither a bug nor a poor design choice. Many languages have the final definition of a Factor to include any number of variable constructs or constant constructs, OR a pair of parens surrounding a valid Expression...which trickles down to allowing a Factor.
You can tell when a language is designed that way by adding parens around a simple assignment, such as x = (5).
Parsing Error!
You have construed two entirely separate statements, separated by paragraph spacing, to be a single statement.

I replied to the quote, and then continued back to the topic on hand
Re: Working out Include Path issues
Posted: Mon Mar 17, 2014 1:48 pm
by Zach
Fred wrote:It can probably changed to be source relative, yes.
Thank you for acknowledging this, Fred!

Re: Working out Include Path issues
Posted: Mon Mar 17, 2014 1:58 pm
by luis
Ahhhh optimism ! So resilient in the face of the passing years ! I like it

Re: Working out Include Path issues
Posted: Wed May 07, 2014 1:39 pm
by Fred
luis wrote:Ahhhh optimism ! So resilient in the face of the passing years ! I like it

Changed for the next version, optimism can pay !

Re: Working out Include Path issues
Posted: Wed May 07, 2014 10:03 pm
by luis
Fred wrote:
Changed for the next version, optimism can pay !

I'm certainly happy to hear that, thanks for reconsidering this. I wasn't expecting a turn around on this subject after being this way all these years

Re: Working out Include Path issues
Posted: Tue May 20, 2014 11:29 pm
by Little John
Fred wrote:Changed for the next version
Cool. Much appreciated, thank you.