> I have a cfloop that loops 6 times, I want to be able to be able to output
> what loop number the current loop is on, and tell if the number is even or
> odd.

The simplest way to determine odd/even is to AND mask off the lowest bit. In
c this is (num&1). There are some cf functions that do this but I don't
recall their names offhand. You can also use MOD to the same effect.

--min

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to