Index of Functions: A B C D E F G H I J K L M N O P Q R S T U V W X
Index Page maxi_c
Table of contents
Procedure Abstract Required_Reading Keywords Brief_I/O Detailed_Input | Detailed_Output Parameters Exceptions Files Particulars Examples | Restrictions Literature_References Author_and_Institution Version Index_Entries
#### Procedure
       maxi_c ( Maximum of a set of integers )

       SpiceInt maxi_c ( SpiceInt n,  ... )
#### Abstract
       Find the maximum of a set of integers.
#### Required_Reading
       PLANES
#### Keywords
       GEOMETRY
       MATH
       PLANE
#### Brief_I/O
       VARIABLE  I/O  DESCRIPTION
       --------  ---  --------------------------------------------------
       n          I   The number of integer values to compare.
       ...        I   The numbers to be compared, separated by commas.
#### Detailed_Input
       n           is the number of integer values in the set whose maximum is to
                   be determined.

       ...         represents a variable argument list. The number of integer
                   values supplied must be that indicated by `n'. The values
                   are separated by commas.

                   Section 5.2.4.1 of the ANSI C Standard, titled "Translation
                   Limits," specifies that argument lists containing at least 31
                   items must be supported. In the interest of portability, no
                   more than 30 integer values should be supplied.
#### Detailed_Output
       The function returns the maximum of the set of input integers.
#### Parameters
       None.
#### Exceptions
       Error free.

       1)  If `n' is less than 1, the value 0 is returned.

       2)  If the number of integer values supplied does not match the
           argument `n', the action of this routine is not defined.

       3)  If the number of integer values supplied exceeds 30,
           the action of this routine is not defined.
#### Files
       None.
#### Particulars
       None.
#### Examples
       1) Find the maximum of four integer values.

          #include "SpiceUsr.h"
               .
               .
               .

          SpiceInt                max;
          SpiceInt                a;
          SpiceInt                b;
          SpiceInt                c;
          SpiceInt                d;
               .
               .
               .

          max = maxi_c ( 4, a, b, c, d );
#### Restrictions
       1)  The ANSI C Standard specifies that argument lists containing 31
           actual arguments must be supported. Larger sets of values may
           not be handled properly by this routine.
#### Literature_References
       [1]  "American National Standard for Programming Languages -- C,"
            Section 5.4.2.1, "Translation Limits," p.13, American National
            Standards Institute, 1990.
#### Author_and_Institution
       N.J. Bachman        (JPL)
       J. Diaz del Rio     (ODC Space)
       E.D. Wright         (JPL)
#### Version
       -CSPICE Version 1.0.2, 10-AUG-2021 (JDR)

           Edited the header to comply with NAIF standard.

       -CSPICE Version 1.0.1, 11-NOV-2006 (EDW)

           Added "None." text to -Particulars section, required for
           API doc script (cspicehtml.pl) integrity checks.

       -CSPICE Version 1.0.0, 29-MAR-1999 (NJB)
#### Index_Entries
       maximum of integer values
#### Link to routine maxi_c source file maxi_c.c

    Fri Dec 31 18:41:09 2021