#odd()

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

# pikt +C 'output $text(#odd(4))'
0

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

    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 outline of
Pikt scripts