Author Topic: concatenating "\"" in my lisp code  (Read 1792 times)

0 Members and 1 Guest are viewing this topic.

Tramber

  • Guest
concatenating "\"" in my lisp code
« on: September 21, 2006, 12:42:08 PM »
Here is my problem :

I want to write HTML through lisp to built a DWF page.
http://www.dwfit.com/

Code: [Select]
<iframe scrolling="no" width="800" height="600"src="http://dwfit.com/dwf.aspx?dwf=http://dwfit.com/sample/hotel5.dwf">
</iframe> 

is the syntax sample provided by Autodesk.

I was pretty sur that obtaining a " in a string line was esay with the help of \"
But it seems not to work, this is what I get with my use of STRCAT :
Code: [Select]
(strcat
      "<iframe scrolling=\"no\" width=\"800\" height=\"600\"
src=\"http://dwfit.com/dwf.aspx?dwf="
      (getvar"dwgprefix"))

Result =
"<iframe scrolling=\"no\" width=\"800\" height=\"600\"\nsrc=\"http://dwfit.com/dwf.aspx?dwf=T:\\ANNEE 2006\\Kieger-SCH\\"

How is it that my \" doesn't help me to get a single " ?

I'm not a beginner but I feel quite like with that problem. I wonder if anyone could help.  :wink:

« Last Edit: September 21, 2006, 12:43:29 PM by Call me Bert' »

T.Willey

  • Needs a day job
  • Posts: 5251
Re: concatenating "\"" in my lisp code
« Reply #1 on: September 21, 2006, 12:49:08 PM »
It will show like that on the command line, but if you print it to the command line with a lisp function, it will look the way you want.
Quote
Command: (strcat
(_>       "<iframe scrolling=\"no\" width=\"800\" height=\"600\"
("_> src=\"http://dwfit.com/dwf.aspx?dwf="
(_>       (getvar"dwgprefix"))
"<iframe scrolling=\"no\" width=\"800\"
height=\"600\"\nsrc=\"http://dwfit.com/dwf.aspx?dwf=C:\\Documents and
Settings\\a0kcdzz\\My Documents\\"

Command: (prompt
(_> (strcat
((_>       "<iframe scrolling=\"no\" width=\"800\" height=\"600\"
(("_> src=\"http://dwfit.com/dwf.aspx?dwf="
((_>       (getvar"dwgprefix"))
(_> )
<iframe scrolling="no" width="800" height="600"
src="http://dwfit.com/dwf.aspx?dwf=C:\Documents and Settings\a0kcdzz\My
Documents\nil
« Last Edit: September 21, 2006, 12:50:46 PM by T.Willey »
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

Tramber

  • Guest
Re: concatenating "\"" in my lisp code
« Reply #2 on: September 21, 2006, 01:50:52 PM »
Oh my god, it is true that I didn't try with a WRITE-LINE, I've just looked at the console !

Thanks. Gonna check if it works soon.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: concatenating "\"" in my lisp code
« Reply #3 on: September 21, 2006, 01:56:12 PM »
You're welcome.  I like the simple to figure out ones.  :-)
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.