Thanks Carl,
Can you explain why 3 double quotes I did try 2 and other combos
Before posting
Laurie
Yeah, three double-quotes looks funny. You will only see that at the beginning or ending of a string literal.
When you construct a string literal doubling up on double-quotes inside in between the beginning and ending of the string literal makes one double quote, so:
"this expression ""has"" a word surrounded by quotes"
and
"""this expression is completely surrounded by quotes"""
In the second example, the first double-quote is the beginning of the string. After that, each pair of double-quotes makes for one double-quote in the string, When you get to the end of the string there is a pair of double-quotes which becomes one double-quote in the string, and then the third double quote defines the end of the string.
Imagine that the compiler sees it more like this:
" ""this expression is completely surrounded by quotes"" "
In the case of your url2find$ question, it may look like my suggested solution below is just one string and that the triple double-quotes are in the middle of the string.
"<div id=""IFR"" ALIGN=""CENTER""><IFRAME SRC="""+url2find$+""" WIDTH=""600"" HEIGHT=""400"" ></div>"
But, you actually have three things that are concatenated using the + operator:
"<div id=""IFR"" ALIGN=""CENTER""><IFRAME SRC="""
+
url2find$
+
""" WIDTH=""600"" HEIGHT=""400"" ></div>"
Notice that the use of three double-quotes together is used at the end of the first line, and at the beginning of the last line. You cannot define a string literal with three (or any odd number grouping) in the middle of a string literal.
But, you can do four, or six, or eight, etc. Like so:
print "Here are four """""""" quotation marks."
Try adding or removing one of these quotation-marks in the middle of the string and you will get a compile error.
Now I've said too much. ;-)
-Carl