Working out Include Path issues

Everything else that doesn't fall into one of the other PB categories.
User avatar
luis
Addict
Addict
Posts: 3893
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: Working out Include Path issues

Post 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 :wink:

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.
"Have you tried turning it off and on again ?"
A little PureBasic review
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Working out Include Path issues

Post by PB »

> Especially this example cannot be more clear -> http://www.purebasic.fr/english/viewtop ... 24#p367924

Ohhhhhhhh, I finally see the light. :lol: I'm getting so old. :(
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Zach
Addict
Addict
Posts: 1675
Joined: Sun Dec 12, 2010 12:36 am
Location: Somewhere in the midwest
Contact:

Re: Working out Include Path issues

Post 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 :oops:
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
Zach
Addict
Addict
Posts: 1675
Joined: Sun Dec 12, 2010 12:36 am
Location: Somewhere in the midwest
Contact:

Re: Working out Include Path issues

Post by Zach »

Fred wrote:It can probably changed to be source relative, yes.
Thank you for acknowledging this, Fred! 8)
User avatar
luis
Addict
Addict
Posts: 3893
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: Working out Include Path issues

Post by luis »

Ahhhh optimism ! So resilient in the face of the passing years ! I like it :)
"Have you tried turning it off and on again ?"
A little PureBasic review
Fred
Administrator
Administrator
Posts: 18153
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Working out Include Path issues

Post 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 ! :)
User avatar
luis
Addict
Addict
Posts: 3893
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: Working out Include Path issues

Post by luis »

Fred wrote: Changed for the next version, optimism can pay ! :)
:shock:

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 :wink:
"Have you tried turning it off and on again ?"
A little PureBasic review
Little John
Addict
Addict
Posts: 4775
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Working out Include Path issues

Post by Little John »

Fred wrote:Changed for the next version
Cool. Much appreciated, thank you.
Post Reply