Subj : BAJA Programming 101.2
To : Digital Man
From : PistolGrip
Date : Sun Oct 21 2001 10:03 pm
RE: BAJA Programming 101.2
BY: Digital Man to PistolGrip on Mon Oct 22 2001 12:33 am
> > ### 2.) The double forward slashes "/" in the path. When you specify p
at
> > ### within a sprintf statement you must use two (2) slashes, either f
>
> Are you sure about this double forward-slash thing? You have to use
> double-backslash to represent a single backslash character (because the C
> programming language uses backslash a special 'escape' character - e.g. '\r'
> indicates carriage return), but the same is not true of the forward slash
> character.
>
> For example, print "\\test\\" would display "\test\"
> print "//test//" would display "//test//"
>
> Just another incentive to use forward slashes instead of backslashes in
> pathnames. :-)
Hrrm... I will have to look into this further. I was going by what I thought
I remembered back when converting modules for linux compatibility. I thought
the single forward slash did not work when used in a sprintf, and my code from
that time is and has been working with two forward slashes.
But, what you say makes sense. I would think it would only apply to the
backslash in retrospect. I will do some tests here with this to see what turns
up.