Re: cfloop conditional help

2006-08-25 Thread srinivas ganta
Hi Try this start=(url.vedio_id/10)*10+1 end=((url.vedio_id/10)+1)*10 Srinivas On 8/25/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I want to loop over a URL.VIDEO_ID value and find the numeric range it falls in. The value range needs to be between 1-10 or 11-21 etc. until the condition

Re: cfloop conditional help

2006-08-25 Thread RichL
this should work if i understand what you are trying to do: !--- set start to id divided by 10, rounded down to nearest integer. Multiply by ten and add one --- cfset start = (int(url.video_id/10) * 10) + 1 !--- set end to id divided by 10 and rounded up, multiply by 10 --- Cfset end =

Re: cfloop conditional help

2006-08-25 Thread Gert Franz
cfset iStart = Int(url.video_id/10)*10 + 1 cfset iStop = Int(url.video_id/10)*10 + 10 cfloop from=#iStart# to=#iStop# index=i /cfloop Greetings / GrĂ¼sse Gert Franz Customer Care [EMAIL PROTECTED] www.railo.ch Join our Mailing List / Treten Sie unserer Mailingliste bei: deutsch:

Re: cfloop conditional help

2006-08-25 Thread RichL
from how i understood this the loop was only being used to ascertain the final range start and end values? if you are using int/ceiling to find these out - then the looping isn't necessary ? On 8/25/06, Gert Franz [EMAIL PROTECTED] wrote: cfset iStart = Int(url.video_id/10)*10 + 1 cfset

RE: cfloop conditional help

2006-08-25 Thread Everett, Al \(NIH/NIGMS\) [C]
I don't think you need to loop at all. Your ranges are 10 numbers apiece, right? cfset currentValue=72 cfset rangeSize=10 !--- Use integer division --- cfset startValue=currentValue \ rangeSize * rangeSize + 1 cfset endValue=startValue + rangeSize - 1 \ is the operator for integer division. 72