Difference between revisions of "Documentation/How Tos/Calc: ISEVEN function"

From Apache OpenOffice Wiki
Jump to: navigation, search
m
m
Line 3: Line 3:
 
== ISEVEN  ==
 
== ISEVEN  ==
 
Returns <tt>'''TRUE'''</tt> if the value is an even number, or <tt>'''FALSE'''</tt> if the value is odd.
 
Returns <tt>'''TRUE'''</tt> if the value is an even number, or <tt>'''FALSE'''</tt> if the value is odd.
 
  
 
=== Syntax: ===
 
=== Syntax: ===
Line 11: Line 10:
  
 
:If <tt>'''value'''</tt> is not an integer any digits after the decimal point are ignored. The sign of <tt>'''value'''</tt> is also ignored.
 
:If <tt>'''value'''</tt> is not an integer any digits after the decimal point are ignored. The sign of <tt>'''value'''</tt> is also ignored.
 
  
 
=== Example: ===
 
=== Example: ===
Line 24: Line 22:
 
<tt>'''ISEVEN(-2.1)'''</tt>
 
<tt>'''ISEVEN(-2.1)'''</tt>
 
: returns <tt>'''TRUE'''</tt>. Ignoring the sign and digits after the decimal point gives 2, which is EVEN.
 
: returns <tt>'''TRUE'''</tt>. Ignoring the sign and digits after the decimal point gives 2, which is EVEN.
 
 
  
 
=== See also: ===
 
=== See also: ===
Line 33: Line 29:
 
'''[[Documentation/How_Tos/Calc: Information functions|Information functions]]''',
 
'''[[Documentation/How_Tos/Calc: Information functions|Information functions]]''',
 
'''[[Documentation/How_Tos/Calc: Mathematical functions|Mathematical functions]]'''
 
'''[[Documentation/How_Tos/Calc: Mathematical functions|Mathematical functions]]'''
 
  
 
=== Issues: ===
 
=== Issues: ===
 
<tt>'''ISEVEN'''</tt> and <tt>'''ISODD'''</tt> are listed in the Mathematical category of the Application Help (OOo2.3). They are clearly similar to other  <tt>'''IS'''</tt> functions in returning information, and belong in the Information category; however as they are listed under Mathematical in the Function Wizard, they are currently shown in that category also.
 
<tt>'''ISEVEN'''</tt> and <tt>'''ISODD'''</tt> are listed in the Mathematical category of the Application Help (OOo2.3). They are clearly similar to other  <tt>'''IS'''</tt> functions in returning information, and belong in the Information category; however as they are listed under Mathematical in the Function Wizard, they are currently shown in that category also.

Revision as of 13:04, 19 January 2008


ISEVEN

Returns TRUE if the value is an even number, or FALSE if the value is odd.

Syntax:

ISEVEN(value)

value is the value to be checked.
If value is not an integer any digits after the decimal point are ignored. The sign of value is also ignored.

Example:

ISEVEN(48)

returns TRUE.

ISEVEN(33)

returns FALSE.

ISEVEN(0)

returns TRUE.

ISEVEN(3.999)

returns FALSE. Ignoring digits after the decimal point gives 3, which is not EVEN.

ISEVEN(-2.1)

returns TRUE. Ignoring the sign and digits after the decimal point gives 2, which is EVEN.

See also:

ISODD function, ISEVEN_ADD function

Information functions, Mathematical functions

Issues:

ISEVEN and ISODD are listed in the Mathematical category of the Application Help (OOo2.3). They are clearly similar to other IS functions in returning information, and belong in the Information category; however as they are listed under Mathematical in the Function Wizard, they are currently shown in that category also.

Personal tools