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 filli_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
       filli_c ( Fill an integer array )

       void filli_c  ( SpiceInt            value,
                       SpiceInt            ndim,
                       SpiceInt            array  [] )
#### Abstract
       Fill an integer array with a specified value.
#### Required_Reading
       None.
#### Keywords
       ARRAY
       ASSIGNMENT
#### Brief_I/O
       VARIABLE  I/O  DESCRIPTION
       --------  ---  --------------------------------------------------
       value      I   Integer value to be placed in all the elements of
                      `array'.
       ndim       I   The number of elements in `array'.
       array      O   Integer array which is to be filled.
#### Detailed_Input
       value       is the value to be assigned to the array elements
                   0 through ndim - 1.

       ndim        is the number of elements in the array.
#### Detailed_Output
       array       is an integer array whose elements are to be set
                   to `value'.
#### Parameters
       None.
#### Exceptions
       Error free.

       1)  If ndim < 1, the array is not modified.
#### Files
       None.
#### Particulars
       None.
#### Examples
       The numerical results shown for this example may differ across
       platforms. The results depend on the SPICE kernels used as
       input, the compiler and supporting libraries, and the machine
       specific arithmetic implementation.

       1) Initialize all members of an integer array to the same value.

          Example code begins here.

          /.
             Program filli_ex1
          ./
          #include <stdio.h>
          #include "SpiceUsr.h"

          int main( )
          {

             /.
             Local parameters.
             ./
             #define NDIM         4

             /.
             Local variables.
             ./
             SpiceInt             array  [NDIM];
             SpiceInt             i;

             /.
             Initialize all members of the array `array' to 11, and
             print out its contents.
             ./
             filli_c ( 11, NDIM, array );

             printf( "Contents of ARRAY:\n" );
             for ( i = 0; i < NDIM; i++ )
             {
                printf( "   Index: %1d; value: %2d\n", (int)i, (int)array[i] );
             }

             return ( 0 );
          }

          When this program was executed on a Mac/Intel/cc/64-bit
          platform, the output was:

          Contents of ARRAY:
             Index: 0; value: 11
             Index: 1; value: 11
             Index: 2; value: 11
             Index: 3; value: 11
#### Restrictions
       None.
#### Literature_References
       None.
#### Author_and_Institution
       J. Diaz del Rio     (ODC Space)
#### Version
       -CSPICE Version 1.0.0, 19-FEB-2021 (JDR)
#### Index_Entries
       fill an integer array
#### Link to routine filli_c source file filli_c.c

    Fri Dec 31 18:41:06 2021