If you're building SQL statements via string variables, which is sometimes necessary, it can make escaping the single quotes for SQL nastier:
<cfset sql = sql & " myColumn = '#attributes.myVal#'," /> vs <cfset sql = sql & ' myColumn = ''#attributes.myVal#'',' /> Also, single quotes are used to delimit characters (which are different from strings with a single-character) in some languages, while double quotes always delimit strings. Java is one example that does, though HTML, JavaScript and ColdFusion make no distinction. In Java, this will fail: char c = "c"; Finally, not all syntax highlighting mechanisms consider single quotes to indicate strings, possibly for the second reason, but probably because the author was lazy ; ) barneyb --- Barney Boisvert, Senior Development Engineer AudienceCentral [EMAIL PROTECTED] voice : 360.756.8080 x12 fax : 360.647.5351 www.audiencecentral.com > -----Original Message----- > From: Bryan F. Hogan [mailto:[EMAIL PROTECTED] > Sent: Friday, August 15, 2003 1:28 PM > To: CF-Talk > Subject: RE: single quotes instead of doubles in cfml > > > Hey, thanks for joining my club. This is exactly what I do and I do it for > the same reasons as you. The parser does not have to work any harder. > > Bryan > > -----Original Message----- > From: David Fafard [mailto:[EMAIL PROTECTED] > Sent: Thursday, August 14, 2003 7:35 PM > To: CF-Talk > Subject: single quotes instead of doubles in cfml > > > Hi. > > I have started using 'single quotes' in all my > cfml coding... like <cfset theVar = 'dave' > > > I just like the look better. > > Is there any downside to this? > Does the coldfusion parser have to work harder? > > Thanks, > Dave Fafard > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm

