# Detecting odd numbers?

**URL:** <https://forum.kirupa.com/t/detecting-odd-numbers/198936>\
**Category:** flash\
**Created:** [August 29, 2006, 8:10pm UTC](https://forum.kirupa.com/t/detecting-odd-numbers/198936 "2006-08-29T20:10:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![REEF](https://avatars.discourse-cdn.com/v4/letter/r/ce73a5/32.png) [@REEF](https://forum.kirupa.com/u/REEF)\
**Post date:** [August 29, 2006, 8:10pm UTC](https://forum.kirupa.com/t/detecting-odd-numbers/198936/1 "2006-08-29T20:10:01Z")

</div>

Is there a script to detect if var a is odd?

I’m trying to do this:

```auto
var a:Number = 3;
if(a is odd) {
trace("a is odd");
else {
trace("a is even");
}

```

And yes var a will always be a whole number, never a decimal.
