Odd Even Numbers

Mark Smith mark at maseurope.net
Wed Feb 8 09:37:02 EST 2006


function isOdd tNumber
   if tNumber mod 2 = 0 then
     return false
   else
     return true
   end if
end isOdd

if  isOdd(x) then set the the textColor of line x of fld "List" to red

Hope this helps,

Mark

On 8 Feb 2006, at 14:28, Robert Presender wrote:

> How does one determine if a number is odd or even?
>
> For example I would like to do something like this:
>
> If the lineNumber of line x of fld "List" is odd then set the  
> textColor to red.
>
> Suggestions are appreciated.
>
> Regards ... Bob
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list