I will go out on a limb here with my C/C++/Java experience and say:
"If (as we all now believe) CFMX is compiled to Java, then it would
logically follow that multiple assignments in one statement ARE quicker
than multiple statements."
This statement assumes:
1. You can actually do that in CFMX (I have never tried)
2. That the CFMX=>Java compiler can correctly optimise this into Java
source (should be simple really)
3. That Java DOES treat multiple assigments in one statement differently
from single assignments in multiple statements.
Gary Menzel
IT Operations Brisbane -+- ABN AMRO Morgans Limited
Level 29, 123 Eagle Street BRISBANE QLD 4000
PH: 07 333 44 828 �FX: �07 3834 0828
[EMAIL PROTECTED] wrote on 01/16/2003 09:56:26 AM:
> FYI: Also,
>
> Instead of using the <CFSET> tags, use <CFSCRIPT> var x = 22 </cfscript>,
if
> its just a once of cfset that yeah i guess cfset is aok, but if you have
a
> block of cfset vars, then use cfscript as its faster and more effecient..
so
> i've been told and read..
>
> Also, would like some clarification, i read yesterday that if you do:
>
> <cfscript>
> � � var i = x = 0;
> </cfscript>
>
> if is faster (runtime wise) to do :
> <cfscript>
> � � var i = 0;
> � � var x = 0;
> </cfscript>
>
> Am i on crack?
>
> Scott
>
> <[EMAIL PROTECTED]> wrote in message news:21892@cfaussie...
> >
> >
> > 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/
---
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/