Page 1 of 1
writing quotes to files
Posted: Mon Mar 22, 2004 5:27 pm
by Guest
Hi,
Ik want to write quotes ("") to files because i want to create a HTML page generator. How can I do this?
Thnx in advance!
Regards,
Matthijs
Re: writing quotes to files
Posted: Mon Mar 22, 2004 8:21 pm
by scorpion
you can do that with te chr$ function
it returns te ASCII char with that number.
when you type this the var. quot$ contains "
qout$ = chr$(32)
Re: writing quotes to files
Posted: Tue Mar 23, 2004 4:01 pm
by Artie
CHR$(32) = space
CHR$(34) = "
Re: writing quotes to files
Posted: Tue Mar 23, 2004 6:49 pm
by scorpion
thanx 4 correcting
Re: writing quotes to files
Posted: Wed Mar 24, 2004 2:26 am
by John_Schofield
At the risk of duplicating what's been stated abovve, here's a short chunk of code to illustrate, from my own program which does what you want to do:
PRINT #4, "<link rel="; CHR$(34); "stylesheet"; CHR$(34); " title="; CHR$(34); "Stylesheet"; CHR$(34); " href="; CHR$(34); "../home.css"; CHR$(34); ">"
PRINT #4, "</HEAD>"
PRINT #4, "<body background="; CHR$(34); "back.gif"; CHR$(34); ">"
PRINT #4, "<a name="; CHR$(34); "top"; CHR$(34); "</a>"
Re: writing quotes to files
Posted: Wed Mar 24, 2004 12:54 pm
by Guest
Hey guys,
Thnx a lot, I have built a nice foto gallery creator for myself!
Greetz,
Matthijs
Re: writing quotes to files
Posted: Mon Nov 08, 2004 11:43 pm
by Ralph
John_Schofield wrote:At the risk of duplicating what's been stated abovve, here's a short chunk of code to illustrate, from my own program which does what you want to do:
PRINT #4, "<link rel="; CHR$(34); "stylesheet"; CHR$(34); " title="; CHR$(34); "Stylesheet"; CHR$(34); " href="; CHR$(34); "../home.css"; CHR$(34); ">"
PRINT #4, "</HEAD>"
PRINT #4, "<body background="; CHR$(34); "back.gif"; CHR$(34); ">"
PRINT #4, "<a name="; CHR$(34); "top"; CHR$(34); "></a>"
Am I wrong, or do I see a lot of html code, not the double quotation marks (") that I would expect???
ARalph
er yes....
Posted: Fri Dec 24, 2004 12:11 am
by John_Schofield
well yes, there's html code - that's because the example is taken from a part of a program where I write a page of plain text with embedded html codes where double quotes are needed - once a file is open (file number 4) the text is printed to it and the double quotes then show up. No need to be a smart arse Ralph.