write-line to include quote ma
How does one write double quotes to a file?for example:
(write-line "alpha beta alpha beta "delta" alpha beta alpha beta")
N.B. delta should have double quote marks, I need it all on one line so this discounts write-char (I think)?
Thanks for any help on this You can concatenate the string using chr(34) wherever you need a quotation. VB recognizes that as the quotation mark.
LINK:
http://www.vbforfree.com/?p=312 Check out the 'Control Character in Quoted Strings' topic in the Vlisp help.It is actually a good one.
At least that's how it is listed in A2K help.-David Following on the above replies, prefix a quote with a backslash to output it as a literal string
\"delta\" will output as "delta"
(write-line "alpha beta alpha beta\"delta \" alpha beta alpha beta")
Regards,
Jammie As in Jammie's example above - the \ (backslash) character prefix will allow the subsequent character to be read as a string instead of a syntax.
i.e.
\\=\
\"="
\n=new line
\t=tab
etc
And so, if you want to specify for example a filepath, one must include the double backslash to indicate a single:
C:\\Users\\Lee Mac\\Documents.... This may also be a way around another problem of spaces in directory names the path stops at a space using lisp, had to resort to VBA to get around it.
C:\\Users\\Lee Mac\\Documents....
or
C:\\Users\\Lee\ Mac\\Documents....
页:
[1]