#even()

DESCRIPTION
    returns TRUE if a given integer is even; FALSE if the integer is odd
SYNOPSIS
    #even(i)
ARGUMENTS
    i - an integer, or integer expression
EXAMPLES
# pikt +C 'output $text(#even(3))'
0

# pikt +C 'output $text(#even(4))'
1

# pikt +C 'output $text(#even(3.5))'
Jun 28 13:00:36 milan pikt[26706]: [ID 7200 ERROR] (../../../src/piktd/expr.y, line 1588,
exprparse()) in #even(), , non-integral argument: 3.500000
-1
SEE ALSO
    #odd()

    Numerical Functions
    String Functions
 
Home | FAQ | News | Intro | Samples | Tutorial | Reference | Software
Developer's Notes | Licensing | Authors | Pikt-Users | Pikt-Workers | Related Projects | Site Index | Privacy Policy | Contact Us
Page best viewed at 1024x768 or greater.   Page last updated 2019-01-12.   This site is PIKT® powered.
Copyright © 1998-2019 Robert Osterlund. All rights reserved.
Home FAQ News Intro Samples Tutorial Reference Software
PIKT Logo
PIKT Page Title
Learn about the
pikth
program