the _ character is indeed legal in CF
Yup. I did manage to run into an instance where ColdFusion would throw
an error when trying to create or reference a variable name begining with an
underscore though. I can't remember where but it may have been a
query cfloop: cfloop
On Jan 23, 2008 11:11 PM, Peter Donahue [EMAIL PROTECTED] wrote:
Hello everyone,
I have an application I need to get up and running ASAP. We've been
trying to create it using PHP. Right now I feel like I'm Beowulf and that
PHP application is Grendle. I have created email applications
Peter...
the _ character is indeed legal in CF, but beware. The use of _ in
combination with certain key words, can trigger ColdFusion's built in
validation. Specifically when you're using it with words like date or
time. I've spent hours trying to figure out why the validation was being
used
Message-
From: Andy Matthews [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 24, 2008 9:19 AM
To: CF-Talk
Subject: RE: The _ character in variable names
Peter...
the _ character is indeed legal in CF, but beware. The use of _ in
combination with certain key words, can trigger ColdFusion's
Right...he was specifically asking about form variables, so that's what I
meant. Thanks for clarifying though Mark.
-Original Message-
From: Gaulin, Mark [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 24, 2008 8:30 AM
To: CF-Talk
Subject: RE: The _ character in variable names
Boosted from livedocs:
Variable naming rules
ColdFusion variable names, including form field names and custom
function and ColdFusion component argument names, must conform to Java
naming rules and the following guidelines:
* A variable name must begin with a letter, underscore, or
the _ character is indeed legal in CF
Yup. I did manage to run into an instance where ColdFusion would throw an
error when trying to create or reference a variable name begining with an
underscore though. I can't remember where but it may have been a
query cfloop: cfloop query=_theQuery.
Is this a legal syntax in ColdFusion
Yes it is. And you can even keep all those [EMAIL PROTECTED] dollar signs in
front
of all variable names ;-)
--
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send
While we're on the topic of variable names, you should make sure to use the
'form' scope for post values and the 'url' scope for get values.
ColdFusion with find the variables without the scope specified, but you get
better code readability and performance when you explicitly use the scope.
On
9 matches
Mail list logo