[integer] mod 2 -- will return 0 if it is even, 1 if odd
so something like this perhaps
function checkEven theNum
if theNum mod 2 = 0 then
return true
else
return false
end if
end checkEven
>Hi,
>
>I'm looking for a function that, when given a number, will return
>whether or not that number is odd or even. I used one in HyperCard,
>but can't seem to find it now.
>
>Thanks, John
>
>Archives: http://www.mail-archive.com/[email protected]/
>Info: http://www.xworlds.com/metacard/mailinglist.htm
>Please send bug reports to <[EMAIL PROTECTED]>, not this list.
--
___________________________________________________________________________
Dr Terry Judd
Lecturer in Instructional Design / Multimedia Developer
Biomedical Multimedia Unit
Faculty of Medicine, Dentistry & Health Sciences
The University of Melbourne
Email: [EMAIL PROTECTED]
Phone: 03 9344 0187
Fax: 03 9344 4998
___________________________________________________________________________
Archives: http://www.mail-archive.com/[email protected]/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.