writing quotes to files
Moderators:Administrator, Global Moderator
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
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
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)
it returns te ASCII char with that number.
when you type this the var. quot$ contains "
qout$ = chr$(32)
....;D.....
Re: writing quotes to files
CHR$(32) = space
CHR$(34) = "
CHR$(34) = "
-
- Full Member
- Posts:36
- Joined:Tue Mar 18, 2003 3:04 am
- Location:Lancashire, UK
- Contact:
Re: writing quotes to files
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>"
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
Hey guys,
Thnx a lot, I have built a nice foto gallery creator for myself!
Greetz,
Matthijs
Thnx a lot, I have built a nice foto gallery creator for myself!
Greetz,
Matthijs
Re: writing quotes to files
Am I wrong, or do I see a lot of html code, not the double quotation marks (") that I would expect???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>"
ARalph
Ralph. Running QuickBASIC Version 4.5, Windows XP Home Edition, Version 2002, Service Pack 2, and HP LaserJet 4L printer.
-
- Full Member
- Posts:36
- Joined:Tue Mar 18, 2003 3:04 am
- Location:Lancashire, UK
- Contact:
er yes....
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.