A single quoted string does not do backslash substitution EXCEPT if the backslash preceeds a single quote or another backslash (else how would you embed a '?)
Therefore, print 'C : \' doesn't work because the \' is taken as an embedded ' instead of two characters. Therefore, you have to escape your backslash in order for it NOT to escape you single quote. In print 'C:\A_Dir\B_SubDir' the \A and \B are not \' and therefore are not treated as escaped characters and you therefore do not have to use \\A or \\B . HTH, Tanton ----- Original Message ----- From: "Connie Chan" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, August 18, 2002 4:57 PM Subject: How do you print 'C:\' ? > I wonder why ... I can't write a line like this : > print 'C : \ '; > but have to : print 'C : \ \ '; > however, I can : print 'C:\A_Dir\B_SubDir'; > The last ' is escaped, why ?? > > Rgds, > Connie > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]