You want to use 'Mod' - can't find it in the help doco, but if you run the code below
you should be able to figure out whats happening
<CFOUTPUT>
<CFLOOP FROM="1" TO="6" INDEX="i">
#i# is
<CFIF i Mod 2>
even
<CFELSE>
odd
</CFIF>
<BR>
</CFLOOP>
</CFOUTPUT>
Bert
> -----Original Message-----
> From: Jason Larson [mailto:[EMAIL PROTECTED]]
> Sent: 20 November 2000 15:58
> To: CF-Talk
> Subject: Finding an Odd Number
>
>
>
> Can someone help me out?
>
> 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.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists