Re: detect multiples?

2009-12-11 Thread Leigh

You can use the modulus operator (ie MOD)

cfif someNumber MOD 6 EQ 0
the number is a multiple of 6 .. or the value is 0
/cfif




  

~|
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:329084
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


re: detect multiples?

2009-12-11 Thread Jason Fisher

The following will only execute the stuff inside the CFIF statement if the 
count is *not* a multiple of 6.

cfloop from=1 to=96 index=i
cfif i mod 6
!--- do whatever you need to ---
/cfif
/cfloop





~|
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:329085
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4