How setq string with Quotation Mark in it?

Discussion in 'AutoCAD' started by Steve Adams, Jul 13, 2004.

  1. Steve Adams

    Steve Adams Guest

    Hi Everybody,

    I want to set the following string : "Arch D (24x36")" to a
    variable,

    but if I say: (setq a "Arch D (24x36")") I get: "Arch D (24x36"

    How do I tell Vlisp that the quotation mark is_part_of the string and not
    the end of it?

    Can anyone help me set this string?

    Thanks,

    Steve Adams
     
    Steve Adams, Jul 13, 2004
    #1
  2. (setq a "Arch D (24x36\")")
    or
    (setq a (strcat "Arch D (24x36" (chr 34) ")"))
     
    Alan Henderson @ A'cad Solutions, Jul 13, 2004
    #2
  3. Steve Adams

    Casey Guest

    I'm afraid your 2nd option doesn't return the desired result... don't know
    why. Here's what I get

    Command: (setq a (strcat "Arch D (24x36"(chr 34)")"))
    "Arch D (24x36\")"

    Command: !a
    "Arch D (24x36\")"
     
    Casey, Jul 14, 2004
    #3
  4. You need to use princ to get the desired display

    (princ a) yields:
    Arch D (24x36")
     
    Allen Johnson, Jul 14, 2004
    #4
  5. Steve Adams

    andywatson Guest

    Casey,
    Instead of typing !a at the command line, type the following to see the actual result....

    Command: (princ a)(princ)
    Arch D (24x36")
     
    andywatson, Jul 14, 2004
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.