udfIsNumberOdd
str udfIsNumberOdd (str, int)
;------------------------------------------------------------------------------------------------------------------------------------------
#DefineFunction udfIsNumberOdd (intNumber)
Return intNumber & 1
#EndFunction
;------------------------------------------------------------------------------------------------------------------------------------------


; Test.

intNumber = 221

blnOdd = udfIsNumberOdd (intNumber)   ; 1 = @TRUE.

blnEven = !udfIsNumberOdd (intNumber) ; 0 = @FALSE.


intNumber = -221

blnOdd = udfIsNumberOdd (intNumber)   ; 1 = @TRUE.

blnEven = !udfIsNumberOdd (intNumber) ; 0 = @FALSE.


intNumber = 222

blnOdd = udfIsNumberOdd (intNumber)   ; 0 = @FALSE.

blnEven = !udfIsNumberOdd (intNumber) ; 1 = @TRUE.

Exit