Path separators

Just starting out? Need help? Post your questions and find answers here.
User avatar
kpeters58
Enthusiast
Enthusiast
Posts: 341
Joined: Tue Nov 22, 2011 5:11 pm
Location: Kelowna, BC, Canada

Path separators

Post by kpeters58 »

From the release announcement for 5.70:

- Added: #PS, #NPS, #PS$ and #NPS$ constants (Path seperator (sic) character depending of the OS)


I get the naming of #PS/#PS$, but what on earth does #NP/#NPS$ stand for?

It seems to be the "other" separator; i.e. on Windows it's '/'. I assume on Unix, it'd be '\'? So the 'N' might stand for NOT?

Is that a valid assessment?
PB 5.73 on Windows 10 & OS X High Sierra
User avatar
NicTheQuick
Addict
Addict
Posts: 1224
Joined: Sun Jun 22, 2003 7:43 pm
Location: Germany, Saarbrücken
Contact:

Re: Path separators

Post by NicTheQuick »

Consider the following code:

Code: Select all

Debug #PS
Debug #NPS
Debug #PS$
Debug #NPS$
On Linux the result is:

Code: Select all

47
92
/
\
On Windows the result is:

Code: Select all

92
47
\
/
The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.
User avatar
TI-994A
Addict
Addict
Posts: 2512
Joined: Sat Feb 19, 2011 3:47 am
Location: Singapore
Contact:

Re: Path separators

Post by TI-994A »

kpeters58 wrote:...the 'N' might stand for NOT?
It denotes non-valid or invalid.
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too! Please visit my YouTube Channel :D
Post Reply