Zip Component, Email Component, Encryption Component ActiveX Control for Zip Compression .NET Components for ASP.NET
ActiveX and .NET Components for Zip Compression, Encryption, Email, XML, S/MIME, HTML Email, Character Encoding, Digital Certificates, FTP, and more ASP Email ActiveX Component


Index of Chilkat Blog Posts

June 12, 2007

FoxPro Literal String - Embed Quote Character

What’s the one thing you need to know when using a literal string in the source code of any programming language? How to embed a quote character.

It can be maddening to locate this tiny piece of information (as it was for me with VFP). Therefore this blog post is appropriately titled with the keywords: FoxPro, literal, string, embed, quote, etc. so that hopefully we’ll save somebody 30 minutes in the future…

Here’s the answer:

LOCAL lcHtmlBody;
	
* Single quotes and double quotes can be embedded in a string by delimiting the string with square brackets:
lcHtmlBody = [<html><body>Embedded Image:<br /><img src="something/dudeAbc.gif"/></body></html>]
	
* Single quotes can be embedded with double quotes:
lcHtmlBody = "<html><body>Embedded Image:<br /><img src='something/dudeAbc.gif'/></body></html>"
	
* Double quotes can be embedded with single quotes:
lcHtmlBody = '<html><body>Embedded Image:<br /><img src="something/dudeAbc.gif"/></body></html>'
	
* You cannot use two quotes in a row (as in VB6) or a backslash (as in C++ or C#) to embed quotes.


Privacy Statement. Copyright 2000-2011 Chilkat Software, Inc. All rights reserved.
Send feedback to support@chilkatsoft.com

Components for Microsoft Windows XP, 2000, 2003 Server, Vista, Windows 7, and Windows 95/98/NT4.