This email is to be read subject to the disclaimer below.

> Or ever better you can actually call a function with cfset :D

> <cfset doMyMonkeylove()>

Yes, I've seen this somewhere in the docs, and been using it for a while.
But the cool thing about being able to use the var keyword with <cfset> is
that now I could go around and implement every single CF tag as an
user-defined function without having to worry about overwriting variables.

 So no more hopping in and out of <cfscript> for things like <cfquery>,
<cffile>, etc. Hooray...

Anyone thought of / interested in doing something like that?

Viktor Radnai
Web Developer, National E-Commerce, Ernst & Young
Direct:  +61 2 9248 4361



                                                                                       
                                             
                    "Scott Barnes"                                                     
                                             
                    <[EMAIL PROTECTED]>                  To:     "CFAussie Mailing 
List" <[EMAIL PROTECTED]>            
                    Sent by:                              cc:                          
                                             
                    [EMAIL PROTECTED]        Subject:     [cfaussie] Re: 
cfset + var inside <cffunction>               
                    mon.com.au                                                         
                                             
                                                                                       
                                             
                    16/01/2003 10:30 AM                                                
                                             
                    Please respond to "CFAussie                                        
                                             
                    Mailing List"                                                      
                                             
                                                                                       
                                             
                                                                                       
                                             





<[EMAIL PROTECTED]> wrote in message news:21889@cfaussie...
>
>
> 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/




--------------------
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/

Reply via email to