Announcements
No record found.
Hi, is there any way to check if an integer is even or odd?
*This post is locked for comments
Hi, use the MOD 2 function to check if there's a remainder then it's odd if not it's even
If ( [tag:yournumber] MOD 2) = 0 then
Message('even')
Else
Message('odd');
Use the MOD operator.
X MOD 2 will result in 0 or 1, when X is respectively even or odd.
Funny is that the MOD operator is not (well) documented. But read some about it here www.mibuso.com/.../viewtopic.php
[int] mod 2 ==1 ??
If ( #yournumber MOD 2) = 0 then
Hi Youssef, thank you.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our 2026 Super Stars!
Thanks to all of our 2025 Community Spotlight stars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.