This email is to be read subject to the disclaimer below.
Hi all,
I have just stumbled upon an useful feature of <cfset> so I thought I share
it with y'all. Someone might find it useful.
It is possible to declare local variables using the 'var' keyword like this
(nothing new here):
function foo() {
var i=0;
[ do stuff ]
}
Unfortunately I couldn't find anything in the CFMX documentation on how to
do the same thing using the <cffunction> tag. So, just as a wacky idea I
tried using the syntax below:
<cffunction name="foo">
<cfset var i=0>
[ do stuff ]
</cffunction>
To my surprise it worked.
Is this a feature of CFMX or does it just work by accident? And if it is a
feature, is it documented somewhere?
Vik
---------------------
Viktor Radnai
Web Developer, National E-Commerce, Ernst & Young
Direct: +61 2 9248 4361
--------------------
NOTICE - This communication contains information which is confidential and
the copyright of Ernst & Young or a third party.
If you are not the intended recipient of this communication please delete
and destroy all copies and telephone Ernst & Young on 1800 655 717
immediately. If you are the intended recipient of this communication you
should not copy, disclose or distribute this communication without the
authority of Ernst & Young.
Any views expressed in this Communication are those of the individual
sender, except where the sender specifically states them to be the views of
Ernst & Young.
Except as required at law, Ernst & Young does not represent, warrant and/or
guarantee that the integrity of this communication has been maintained nor
that the communication is free of errors, virus, interception or
interference.
Liability limited by the Accountants Scheme, approved under the
Professional Standards Act 1994 (NSW)
--------------------
---
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MX Downunder AsiaPac DevCon - http://mxdu.com/