Index Page
errdp_c
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X 

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

   void errdp_c ( ConstSpiceChar  * marker,
                  SpiceDouble       number  )

Abstract

   Substitute a double precision number for the first occurrence of
   a marker found in the current long error message.

Required_Reading

   ERROR

Keywords

   ERROR, CONVERSION


Brief_I/O

   VARIABLE  I/O  DESCRIPTION
   --------  ---  --------------------------------------------------
   marker     I   A substring of the error message to be replaced.
   number     I   The d.p. number to substitute for marker.

Detailed_Input

   marker     is a character string which marks a position in
              the long error message where a character string
              representing an double precision number is to be
              substituted.  Leading and trailing blanks in marker
              are not significant.

              Case IS significant;  "XX" is considered to be
              a different marker from "xx".

   number     is an double precision number whose character
              representation will be substituted for the first
              occurrence of marker in the long error message.
              This occurrence of the substring indicated by marker
              will be removed, and replaced by a character string,
              with no leading or trailing blanks, representing
              number.

Detailed_Output

   None.

Parameters

   None.

Exceptions

   1) The error SPICE(EMPTYSTRING) is signalled if the input
      string does not contain at least one character, since the
      input string cannot be converted to a Fortran-style string
      in this case.

   2) The error SPICE(NULLPOINTER) is signalled if the input string
      pointer is null.

Files

   None.

Particulars

   The effect of this routine is to update the current long
   error message.  If no marker is found, (e.g., in the
   case that the long error message is blank), the routine
   has no effect.  If multiple instances of the marker
   designated by marker are found, only the first one is
   replaced.

   If the character string resulting from the substitution
   exceeds the maximum length of the long error message, the
   characters on the right are lost.  No error is signalled.

   This routine has no effect if changes to the long message
   are not allowed.

Examples

    1.   In this example, the marker is:   #


         The current long error message is:

            "Invalid operation value.  The value was #".


         After the call,

            errdp_c ( "#",  5.0  );

         The long error message becomes:

         "Invalid operation value.  The value was 5.0".




    2.   In this example, the marker is:   XX


         The current long error message is:

            "Left endpoint exceeded right endpoint.  The left"//
            "endpoint was:  XX.  The right endpoint was:  XX."


         After the call,

            errdp_c ( "XX",  5.0  );

         The long error message becomes:

            "Left endpoint exceeded right endpoint.  The left"//
            "endpoint was:  5.0.  The right endpoint was:  XX."

Restrictions

   The caller must ensure that the message length, after sub-
   stitution is performed, doesn't exceed LMSGLN characters.

Literature_References

   None.

Author_and_Institution

   N.J. Bachman    (JPL)

Version

   -CSPICE Version 1.2.0, 08-FEB-1998 (NJB)

      Re-implemented routine without dynamically allocated, temporary
      strings.  Made various header fixes.

   -CSPICE Version 1.0.0, 25-OCT-1997 (EDW)

Index_Entries

   insert d.p. number into error message text

Link to routine errdp_c source file errdp_c.c

Wed Apr  5 17:54:34 2017