Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QB64 Phoenix Edition v3.11.0 Released!
#30
(01-08-2024, 08:18 AM)RhoSigma Wrote:
(01-08-2024, 12:37 AM)a740g Wrote:
(01-07-2024, 11:09 PM)zaadstra Wrote: Nice!

How to program:

PRINT "Parent directory full path: "; _FULLPATH$("../")            src:

if you want your.bas be working for Win and for Linux/Mac?  I mean, the slash ...

QB64-PE will auto-correct slashed based on the platform.

For example, the above code will return the directory name with a forward slash on macOS and Linux. And it will return the directory name with a backslash on Windows.

See example 2 in  _FILES$ - QB64 Phoenix Edition Wiki for a way to manually handle path separators based on the OS.

Guess his question did rater target on the input string than on the result. If the input string uses backslashes like in windows on a LNX/MAC system, is it handled correctly or errors the backslash on LNX/MAC. That's indeed not detailed in the wiki, you just detail the result's behavior on different OS's.

But assume it works as in all other file related commands.
Yeah. You are correct. All our filesystem and file I/O functions and statements that take a file / path name does the auto-correct.
Reply


Messages In This Thread
QB64 Phoenix Edition v3.11.0 Released! - by a740g - 01-03-2024, 05:45 PM
RE: QB64 Phoenix Edition v3.11.0 Released! - by a740g - 01-08-2024, 11:52 AM



Users browsing this thread: 13 Guest(s)