• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

single and double quotes

LEGEND ,
Apr 25, 2007 Apr 25, 2007

Copy link to clipboard

Copied

Can anyone tell me what the difference is between using single and double
quotes in this context.

<cfif IsDefined("FORM.MyForm")>

verses

<cfif IsDefined('FORM.MyForm')>

I can't seem to find anything in the DOCs regarding the issue

TIA

Bill


TOPICS
Advanced techniques

Views

273

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 25, 2007 Apr 25, 2007

Copy link to clipboard

Copied

It probably doesn't matter. You can always run some tests to be sure.

CF allows you to use both. This allows you to include either as part of a string.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 25, 2007 Apr 25, 2007

Copy link to clipboard

Copied

That's what I was noticing. Thanks Dan

Bill


"Dan Bracuk" <webforumsuser@macromedia.com> wrote in message
news:f0ot7u$8b8$1@forums.macromedia.com...
> It probably doesn't matter. You can always run some tests to be sure.
>
> CF allows you to use both. This allows you to include either as part of a
> string.


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 26, 2007 Apr 26, 2007

Copy link to clipboard

Copied

LATEST
The one thing about single and double quotes is that they can be nested,
this is in the documentation. This allows functionality like this:

<cfset aString = "Bill asked, 'what is the difference between using
single and double quotes.' I hope this answer helps.">

OR

<a ... onClick='aFunction("aString")';>

Other then this, they are interchangeable.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation