Jochem,
I expect that the cfscript version of that particular code is going to be
significantly slower than the cfml version. The cfml version is taking
advantage of a list loop with does a single tokenization of the list. The
cfscript version tokenizes the list twice in each iteration--once for the
listLen call and once for the listGetAt call.
Some things are still better left in cfml.
Please feel free to prove me wrong--I'd be very happy in this case.
Best regards,
Sam
----------------------------------------
Blog http://www.rewindlife.com
TeamMM http://www.macromedia.com/go/team
----------------------------------------
> -----Original Message-----
> From: Jochem van Dieten [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 06, 2004 2:52 PM
> To: CF-Talk
> Subject: Re: Can the following be written in cfscript?
>
> Che Vilnonis wrote:
>
> > If yes, how would it look. :)
> >
> > <cfif NOT isDefined("Form.Fieldnames")>
> > <cfset Fieldnames = "CCType,CCNumber,CCID,CCMonth,CCYear,CCExpire">
> > <cfloop list="#Fieldnames#" index="i">
> > <cfset Form[i] = "">
> > </cfloop>
> > </cfif>
>
> if (NOT IsDefined("Form.Fieldnames") {
> Fieldnames = "CCType,CCNumber,CCID,CCMonth,CCYear,CCExpire" ;
> for ( i=1 ; i LTE ListLen(Fieldnames) ; i = i + 1 ) {
> form[ListGetAt(Fieldnames,i)] = "";
> }
> }
>
> Jochem
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
[Donations and Support]
- Can the following be written in cfscript? Che Vilnonis
- Re: Can the following be written in cfscript? Jochem van Dieten
- RE: Can the following be written in cfscr... Che Vilnonis
- Re: Can the following be written in cfscr... Samuel R. Neff
- Re: Can the following be written in c... Jochem van Dieten
- Re: Can the following be written in cfscript? Mark Drew
- RE: Can the following be written in cfscript? DURETTE, STEVEN J (AIT)
- Re: Can the following be written in cfscript? S . Isaac Dealey
- RE: Can the following be written in cfscript? S . Isaac Dealey
- RE: Can the following be written in cfscr... Samuel R. Neff
- RE: Can the following be written in c... Joe Eugene
- RE: Can the following be written ... Jim Davis
- Re: Can the following be written ... Dave Carabetta
- RE: Can the following be wri... Joe Eugene