I'd be sticking to the readable option thanks.
Jeez man, I'm glad I don't have to maintain any of your code ;)
Spike
Steve Martin wrote:
Sorry, misread it. Thought you were looping over list elements. Should have looked closer.
<stands in corner>
But yes, interesting about the speed thing. Listqualify does however allow you to specify whether to qualify CHARs only.
-----Original Message----- From: Paul Johnston [mailto:[EMAIL PROTECTED] Sent: 01 July 2003 15:17 To: [EMAIL PROTECTED] Subject: RE: [ cf-dev ] stuipid list question
Heh! Either completely missing the point or taking the pissPut the code into a page and run it as is... Then you'll see I'm not taking
You wacky funster you! ;-)
the piss and haven't missed the point.
Paul
http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/"'"> </cfloop>-----Original Message----- From: Paul Johnston [mailto:[EMAIL PROTECTED] Sent: 01 July 2003 13:49 To: [EMAIL PROTECTED] Subject: RE: [ cf-dev ] stuipid list question
Interesting you say listqualify() and you are correct, but...
To do what you want, it may be quicker to do it like this:
<cfset list = ""> <cfloop from="1" to="20" index="i"> <cfset list = listappend(list, randrange(1,1000))> </cfloop> <cfoutput>#list#</cfoutput>
<cfset numOfIterations = "10000">
<cfset a = gettickcount()> <cfloop from="1" to="#numOfIterations#" index="i"> <cfset list2 = listqualify(list, "'", ",")> </cfloop> <cfset b = gettickcount()> <cfset c = b - a> <cfoutput>#list2# (#c#)</cfoutput>
<cfset a = gettickcount()>
<cfloop from="1" to="#numOfIterations#" index="i">
<cfset list3 = "'" & replace(list, ",", "','", "all") &
http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/<cfset b = gettickcount()> <cfset d = b - a> <cfoutput>#list3# (#d#)</cfoutput>
<cfset percentage = (d/c) * 100> <cfoutput>#DecimalFormat(percentage)#%</cfoutput>
I've just done some testing, and the second option seems to take about 75% of the time of the listqualify().
:D
HTH
Paul
-----Original Message----- From: Taz [mailto:[EMAIL PROTECTED] Sent: 01 July 2003 13:41 To: [EMAIL PROTECTED] Subject: Re: [ cf-dev ] stuipid list question
ListQualify()
Taz
Whats the best to change a list into a quoted listhttp://www.mail-archive.com/dev%> 40lists.cfdeveloper.co.uk/
e.g. a,b -> 'a','b'
I'm sure there is a quick way to do this without cfloop....
Thanks @j
--
** Archive:
To unsubscribe, e-mail:[EMAIL PROTECTED]
For additional commands, e-mail:[EMAIL PROTECTED] For
human help, e-mail: [EMAIL PROTECTED]--
** Archive:
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED]
--
** Archive:
http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED]
--
** Archive:
To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED]
-- ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED]
-- Stephen Milligan Consultant for hire http://www.spike.org.uk
