Contents | Prev | Next

7.2.42 The odd function

Description

The odd function returns a value of type boolean, which indicates whether the parameter passed to it is odd (i.e. not evenly divisible by two). If the parameter is odd then the value true is returned, and if the parameter is not odd then the value false is returned.

Parameter

The odd function's only parameter is an expression of integral type.

Example

   odd(0)  return   false
   odd(1)  return   true
   odd(2)  return   false
   odd(-43)  return true
   odd(-44)  return false

Portability

Operating Systems: All
Standard Pascal: Yes

Contents | Prev | Next