How about a standard PB constant of #PATHDELIM$ ?
I try to only write code that is cross-platform. If I ever need to build a file path string, then I could use this PB constant and not have to worry about which platform I'm compiling on.
For example,
On Linux -
#PATHDELIM$ = "/"
On Windows -
#PATHDELIM$ = "\"
On OS X -
#PATHDELIM$ = "/" (MacOS 8 & 9 used ":", OS X allows both)
On Amiga -
#PATHDELIM$ = "/" (is this correct?)
But in code we just use #PATHDELIM$, and so it would be correct for whichever platform we're compiling on:
MyPathString = "HOME" + #PATHDELIM$ + "BACKUP" + #PATHDELIM$ + MyFileName
Or maybe a constant like this already exists???
Thanks,
Brian
Standard file path delimiter constant #PATHDELIM$ for PB ?
Automatic would be nice and superior solution but...
...I like the simplicity of just a platform-specific constant. Besides, there's a better chance of getting this in, it would be a very simple change.
Re: Standard file path delimiter constant #PATHDELIM$ for PB
> maybe a constant like this already exists???
viewtopic.php?t=8187
Just put the correct delimiter in for each CompilerCase command.
viewtopic.php?t=8187
Just put the correct delimiter in for each CompilerCase command.