newLISP Fan Club

Forum => newLISP and the O.S. => Topic started by: ale870 on September 15, 2009, 02:48:52 AM

Title: How to create a string with a single backslash?
Post by: ale870 on September 15, 2009, 02:48:52 AM
Hello,



I found a problem: I need to create a string with "".



See here:


> (setq a (string "1" {} "2"))
"1\2"


Well, I tried in many ways, but I get an error, or I get a string with a double "\" instead a single "". I need it to create a Windows network path:



\myservershared_dirmyfile.txt



It seems incredible, but I cannot find a way, in windows (but I even made some tests in Liunux and the results are similar) to compose that string.



Please can you help me?



Thank you!
Title:
Post by: ale870 on September 15, 2009, 02:59:24 AM
UPDATE: Sorry, I'm eating my brain! I made a mistake.



See here:


> (setq a (string "1\2"))
"1\2"
> (length a)
3


The final string is correct: 3 characters long.



Topic closed because I'm stupid  :-)