can I do the following entirety in script? (CF8)

2009-10-02 Thread Glyn Jackson

Hi, 

cfscript (ColdFusion 8) can I do the following entirety in script?


cfloop index=i list=#listToUpdate# DELIMITERS=, 

value = #i#

/cfloop

Thanks 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326834
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: can I do the following entirety in script? (CF8)

2009-10-02 Thread Tony Bentley

for(i=1;i lte listlen(listToUpdate,,);i++){
#listgetat(listToUpdate,i,,)#
}

Hi, 

cfscript (ColdFusion 8) can I do the following entirety in script?


cfloop index=i list=#listToUpdate# DELIMITERS=, 

value = #i#

/cfloop

Thanks 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326835
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: can I do the following entirety in script? (CF8)

2009-10-02 Thread Tony Bentley

for(i=1;i lte listlen(listToUpdate,,);i++){
#listgetat(listToUpdate,i,,)#
}

sorry forgot WriteOutput(listgetat(listToUpdate,i,,)) 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326836
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: can I do the following entirety in script? (CF8)

2009-10-02 Thread Barney Boisvert

This isn't a list loop, it's an index loop into a list.  There's is a
marked performance difference if you list is of any size, because you
have to do tokenization of the list at least twice per loop when you
use an index loop.  I did some tests a few years ago and even a
10-item list is about twice as slow to do what you propose compared
with converting the list to an array and looping over the array
(because the tokenization only happens  once).  A 20-item list takes
ten times as long.

The moral of the story is that if you're going to loop over a list
with an index, convert the list to an array first.

cheers,
barneyb

On Fri, Oct 2, 2009 at 8:11 AM, Tony Bentley t...@tonybentley.com wrote:

 for(i=1;i lte listlen(listToUpdate,,);i++){
 #listgetat(listToUpdate,i,,)#
 }

Hi,

cfscript (ColdFusion 8) can I do the following entirety in script?


cfloop index=i list=#listToUpdate# DELIMITERS=, 

value = #i#

/cfloop

Thanks

 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326841
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: can I do the following entirety in script? (CF8)

2009-10-02 Thread Glyn Jackson

barneyb thats interesting thanks


~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326862
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4