Author Topic: Inches Mark in Quotes  (Read 2246 times)

0 Members and 1 Guest are viewing this topic.

DanB

  • Bull Frog
  • Posts: 367
Inches Mark in Quotes
« on: June 02, 2005, 09:51:38 AM »
I'm having trouble creating the following text string output in LISP.

Code: [Select]

  (setq string1 (strcat (rtos dist1 2 0) " LF OF 8" PVC @ 0.36%"  ))


I am aware there is an issue with my quotation marks (possibly lack of them) where I would like the output string to look like this (example):
  185 LF OF 8" PVC @ 0.36%
I cannot get the Inch mark after 8 to display. Any suggestions?

Thanks,
Dan

DanB

  • Bull Frog
  • Posts: 367
Inches Mark in Quotes
« Reply #1 on: June 02, 2005, 09:53:55 AM »
Nevermind, after some further "testing" I figured it out. The code should read:

Code: [Select]

  (setq string1 (strcat (rtos dist1 2 0) " LF OF 8\" PVC @ 0.36%"  ))


At least this appears to be working.

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Inches Mark in Quotes
« Reply #2 on: June 02, 2005, 10:09:16 AM »
You can also use chr as in;
Code: [Select]

Command: (princ (strcat (chr 34)"This"(chr 34) " is in quotes"))(princ)
"This" is in quotes

Command: (ascii "\"")
34
TheSwamp.org  (serving the CAD community since 2003)