try this...
<cfset inputField="1,2,5-10">
<cfset count=0>
<cfset temp=0>
<cfloop list="#inputField#" index="i" delimiters=",">
<cfif Find("-",i,1)>
<cfset temp=abs(evaluate(i))>
</cfif>
<cfset count=count+1+temp>
</cfloop>
<cfoutput>#count#</cfoutput>
Nick Han
>>> [EMAIL PROTECTED] 09/20/02 11:28AM >>>
I have a text field that I allow users to input data as follows:
1,2,5-9
Basically it is a coma delmited list with a range. Whats the best way to
get a count... in this case I'd need to return 7
Thanks in advance...
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists