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
cspice_daslla

Table of contents
Abstract
I/O
Parameters
Examples
Particulars
Exceptions
Files
Restrictions
Required_Reading
Literature_References
Author_and_Institution
Version
Index_Entries


Abstract


   CSPICE_DASLLA returns last DAS logical addresses of character, double
   precision and integer type that are currently in use in a specified DAS
   file.

I/O


   Given:

      handle   the file handle of a DAS file whose active logical address
               ranges are desired.

               help, handle
                  LONG = Scalar

   the call:

      cspice_daslla, handle, lastc, lastd, lasti

   returns:

      lastc,
      lastd,
      lasti    respectively, the last 1-based logical addresses of character,
               double precision, and integer type in use in the specified DAS
               file.

               help, lastc
                  LONG = Scalar
               help, lastd
                  LONG = Scalar
               help, lasti
                  LONG = Scalar

Parameters


   None.

Examples


   Any numerical results shown for this example may differ between
   platforms as the results depend on the SPICE kernels used as input
   and the machine specific arithmetic implementation.

   1) Create a DAS file containing 10 integers, 5 double precision
      numbers, and 4 characters, then use cspice_daslla to find the logical
      address ranges in use.


      Example code begins here.


      PRO daslla_ex1

         ;;
         ;; Local parameters.
         ;;
         FNAME  =   'daslla_ex1.das'

         ;;
         ;; Open a new DAS file. Use the file name as the internal
         ;; file name, and reserve no records for comments.
         ;;
         type   = 'TEST'
         ifname = 'TEST.DAS/NAIF/NJB/11-NOV-1992-20:12:20'

         cspice_dasonw, FNAME, type, ifname, 0L, handle

         for i=1L, 10L do begin

            cspice_dasadi, handle, [i]

         endfor

         for i=1L, 5L do begin

            cspice_dasadd, handle, [DOUBLE( i )]

         endfor

         ;;
         ;; Add character data to the file. DAS character data are
         ;; treated as a character array, not as a string. The
         ;; following call adds only the first 4 characters to the
         ;; DAS file.
         ;;
         cspice_dasadc, handle, 4L, 0, 3, BYTE( 'SPUDWXY' )

         ;;
         ;; Now check the logical address ranges.
         ;;
         cspice_daslla, handle, lastc, lastd, lasti

         print, 'Last character address in use: ', lastc
         print, 'Last d.p. address in use     : ', lastd
         print, 'Last integer address in use  : ', lasti

         ;;
         ;; Close the DAS file.
         ;;
         cspice_dascls, handle

      END


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


      Last character address in use:            4
      Last d.p. address in use     :            5
      Last integer address in use  :           10


      Note that after run completion, a new DAS file exists in the
      output directory.

Particulars


   This routine is a utility that allows a calling program to
   find the range of logical addresses currently in use in any
   DAS file.

Exceptions


   1)  If the input file handle is invalid, an error is signaled by
       a routine in the call tree of this routine.

   2)  If the input argument `handle' is undefined, an error is
       signaled by the IDL error handling system.

   3)  If the input argument `handle' is not of the expected type, or
       it does not have the expected dimensions and size, an error is
       signaled by the Icy interface.

   4)  If any of the output arguments, `lastc', `lastd' or `lasti',
       is not a named variable, an error is signaled by the Icy
       interface.

Files


   None.

Restrictions


   None.

Required_Reading


   DAS.REQ
   ICY.REQ

Literature_References


   None.

Author_and_Institution


   J. Diaz del Rio     (ODC Space)

Version


   -Icy Version 1.0.0, 29-JUN-2021 (JDR)

Index_Entries


   return last logical addresses in DAS file
   return logical address range of DAS file



Fri Dec 31 18:43:03 2021