[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 ODD                      Test for Odd/Even Integer                   pp 141

 Syntax:  Odd (IntVar) ;

 Type:    Boolean

 Form:    Function

 Purpose: Returns True if Intvar is odd and False if IntVar is even.

 Notes:   Odd is the transfer instruction to convert Integer data
          to Boolean type.


 ----------------------------------------------------------------------------


 Usage:
       VAR
          IntVar : Integer;               { Must be Integer Type       }

       BEGIN
          If Odd (IntVar) then            { If IntVar is odd numbered  }
             IntVar := IntVar + 1;        { Bump to next even number   }

          If not Odd (IntVar) then        { If IntVar is even numbered }
             IntVar := IntVar + 1;        { Bump to next odd number    }
       END.

This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson