qp.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
Pred and Succ Functions
  Summary Details Example                                   Back
 
  Argument
 
    value          Expression of ordinal type
 
  Returns
 
    <same type>    Predecessor or successor of value
 
  Description
 
    The Pred function returns the predecessor to an ordinal value.
    The predecessor is the value preceding the given value in the
    ordinal type list for the value.
 
    The Succ function returns the successor to an ordinal value.
    The successor is the value following the given value in the
    ordinal type list for the value.
 
      Argument Type                          Example Call    Return
      ══════════════════════════════════     ════════════    ══════
      Character                              Pred( 'B' )     'A'
      Any integer type                       Pred( x )       x-1
      Enumerated type Days=(Mon,Tue,Wed)     Pred( Wed )     Tue
 
      Argument Type                          Example Call    Return
      ══════════════════════════════════     ════════════    ══════
      Character                              Succ( 'A' )     'B'
      Any integer type                       Succ( x )       x+1
      Enumerated type Days=(Mon,Tue,Wed)     Succ( Mon )     Tue
 
    Pred works with Boolean values as follows:
 
      Example Call     Return
      ═════════════    ══════
      Pred( True )     False
      Succ( False )    True
      Pred( False )    True
      Succ( True )     True