Click to See Complete Forum and Search --> : Write HTML format to file
astrahhan
May 10th, 2001, 06:37 AM
I need to write an html file and I am using PRINT statement. The problem is that there are to many " and \ where I thought to use chr(34) function. This is very time consuming. Is there an easer way to write " and / characters?
coolbiz
May 10th, 2001, 08:08 AM
Not sure if you're concern with CPU time consuming or typing the actual code (having a lot of "" every where can be pretty confusing too).
Anyway, you can assign a " to a var like this:
szQuote = """"
and then you can use it like this:
print #1, "<body bgcolor=" & szQuote & "yellow" & szQuote & ">"
But I don't see the advantage on doing so compared to:
print #1, "<body bgcolor=""yellow"">"
Maybe you can explain more on the problem.
-Cool Bizs
Cakkie
May 10th, 2001, 09:14 AM
Well in a lot of case yo ucan omit the " in html.
<BODY BGCOLOR=BLUE> will give the same result as <BODY BGCOLOR="BLUE">
OR
you might want to cinsider to put the default stuff in a file and read that file. Like the part you use in the beginning of you document. This brings another advantage that you don't need to recompile your app if you want to change the style of the page.
Tom Cannaerts
slisse@planetinternet.be
Programming today is a race between software engineers striving to build bigger and better idot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.