hi everyone
i seem to have forgotten how to put a double quote into a string. Help!
thanks
From the help file (which would help you if you read it):
QuoteString literals
A string literal is text enclosed in quotes. The compiler supports string escape sequences to insert special ASCII values into the string without having to use CHR$ to generate them. String literals are stored in the executable when compiled.
Examples:
Mystring = "This is a string"
' a string with embedded quotes
MyString2 = "This \"is\" a string"
Larry
thanks. cant help irratic behavior though.
In my program, CB Browser, I have a line that looks like this:
Begin with:
Def q$[100]:istring
Then IString q$:
q$="creating a text file, "+"\"" + "LoadURLs.Txt" + "\"" + " with Notepad. A maximum of 40 URLs."+"\n"
It prints out like this.
creating a text file, "LoadURLs.Txt" with Notepad. A Maximum of 40 URLs.
The technique is a little unusual but works well.
Regards, Don Smith [MarineDon]
Don,
Your's works but it reallity you're doing what the help file says do.
You're just breaking up a string for no reason.
your string:
q$="creating a text file, "+"\"" + "LoadURLs.Txt" + "\"" + " with Notepad. A maximum of 40 URLs."+"\n"
and what the manual says:
q$="creating a text file, \" LoadURLs.Txt \" with Notepad. A maximum of 40 URLs.\n"
give the same result
Larry