$isodd

$isodd

Welcome to our Knowledge Base

Documentation | Blog | Demos | Support

< All Topics
Print

$isodd

Tests if a number is odd.

Syntax

$isodd(expression)

Parameters

expressiona number, or an expression that evaluates to a number

Return Value

If expression evaluates to an odd number, the function returns “1” ($True); if expression evaluates to an even number, the function returns”0″ ($False)

If expression does not evaluate to a number, the software raises an error.  The function returns “0” ($False).

Comments

Expression is rounded before testing.

Example

$isodd(vAmount)=$False

Evaluates to $True if vAmount is even.

$isodd(-5)

Evaluates to $True.

$isodd(Salary*1.1)

Evaluates to $False if Salary is 20,000.

$isodd("123.4")

Evaluates to $True.

$isodd("abc")

Evaluates to $False.

See Also

$isnumber

About Functional Expressions

Was this article helpful?
0 out of 5 stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *

pt_BRPortuguese