Difference between revisions of "Quotes"
From HashVB
m (Added sample output) |
m (Slightly less ambigious...) |
||
Line 6: | Line 6: | ||
The recommended method is to double them up as it is compiled as a static string rather than having to create it dynamically and call the Chr() function at runtime. | The recommended method is to double them up as it is compiled as a static string rather than having to create it dynamically and call the Chr() function at runtime. | ||
− | MsgBox "There is | + | MsgBox "There is one double quote >""< here." |
This example will show a messagebox containing: | This example will show a messagebox containing: | ||
− | There is | + | There is one double quote >"< here. |
Happy quoting. | Happy quoting. |
Latest revision as of 14:39, 22 October 2006
This article is based on Visual Basic 6. Find other Visual Basic 6 articles. |
There are several ways of including a double quote in a string literal (a hard coded string):
- The Chr function - Chr$(34)
- Doubling them up - ""
The recommended method is to double them up as it is compiled as a static string rather than having to create it dynamically and call the Chr() function at runtime.
MsgBox "There is one double quote >""< here."
This example will show a messagebox containing:
There is one double quote >"< here.
Happy quoting.