To extend that theme, and to exaggerate a little bit to be clear as possible:
Could also write a simple search-and-replace routine that uses "MID$()" LHS for one character:
Pipe symbol is special to shell so cannot be used in a filename neither in Linux nor Windows. On MacOS, who knows? Maybe Fifi could tell us.
Note: I didn't include the subprogram because I don't have it with me at the moment. I have another one which works differently, ie. for search and replace strings of different lengths and therefore it doesn't use "MID$()" command.
Code: (Select All)
DIM slosh AS STRING, pichan AS LONG
$IF WIN THEN
slosh = "\"
$ELSE
slosh = "/"
$END IF
pichan = _LOADIMAGE("." + slosh + "a" + slosh + "directory" + slosh + "with" + slosh + "forward" + slosh + "slashes", 32)
Could also write a simple search-and-replace routine that uses "MID$()" LHS for one character:
Code: (Select All)
DIM slosh AS STRING, mypath AS STRING
$IF WIN THEN
slosh = "\"
$ELSE
slosh = "/"
$END IF
mypath = ".|a|directory|with|forward|slashes"
ReplaceString mypath, "|", slosh
pichan = _LOADIMAGE(mypath, 32)
Pipe symbol is special to shell so cannot be used in a filename neither in Linux nor Windows. On MacOS, who knows? Maybe Fifi could tell us.
Note: I didn't include the subprogram because I don't have it with me at the moment. I have another one which works differently, ie. for search and replace strings of different lengths and therefore it doesn't use "MID$()" command.