intmax_c |

## ProcedureSpiceInt intmax_c () ## AbstractReturn the value of the largest (positive) number representable in a SpiceInt variable. ## Required_ReadingNone. ## KeywordsCONSTANTS ## Brief_I/OThe function returns the value of the largest (positive) number that can be represented in a SpiceInt variable. ## Detailed_InputNone. ## Detailed_OutputThe function returns the value of the largest (positive) number that can be represented in an SpiceInt variable, where SpiceInt is a typedef defined in SpiceZdf.h. The returned value will be greater than or equal to 2147483647. See the Particulars section for details. ## ParametersNone. ## ExceptionsError free. ## FilesNone. ## ParticularsThe typedef SpiceInt is used throughout the CSPICE API to refer to integers; the precise type of integer is platform-dependent. A SpiceInt always maps to the same type as does the f2c typedef integer. When translating Fortran code, f2c maps Fortran variables of type INTEGER to C variables of type "integer," where integer is a typedef defined in the f2c header file f2c.h. On all supported platforms, Fortran INTEGERS occupy at least 32 bits. On most platforms, this means that the typedef integer translates to type long. There are some exceptional platforms on which an integer translates to type int. The mapping must provide compatibility with the f2c typedef doublereal: integers must occupy half the storage of doublereals in order for these types to correctly represent the Fortran types INTEGER and DOUBLE PRECISION. On systems where the typedef integer maps to type long, the return value is defined by the macro LONG_MAX from the ANSI standard header file limits.h. According to the ANSI standard, LONG_MAX must be at least 2147483647 This is 31 2 - 1 On systems where the typedef integer maps to type int, the value is defined by the macro INT_MAX from the ANSI standard header file limits.h. According to the ANSI standard, INT_MAX must be at least 32767 This is 15 2 - 1 In practice however, the typedef integer will map to type int only if ints occupy at least four bytes, so the value of INT_MAX will actually be at least 2147483647. ## ExamplesThe following code fragment illustrates the use of ## RestrictionsNone. ## Literature_ReferencesNone. ## Author_and_InstitutionN.J. Bachman (JPL) W.L. Taber (JPL) I.M. Underwood (JPL) ## Version-CSPICE Version 1.1.0, 29-JAN-1999 (NJB) Header has been updated to describe in more detail the choice of return value, and the dependency of the value on the host environment. -CSPICE Version 1.0.0, 16-OCT-1998 (NJB) ## Index_Entrieslargest integer number |

Wed Apr 5 17:54:37 2017