|
Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.stsci.edu/~sontag/spicedocs/cspice/prsint_c.html
Дата изменения: Sat Dec 17 06:09:29 2005 Дата индексирования: Mon Apr 11 00:06:52 2016 Кодировка: Поисковые слова: http www.badastronomy.com phpbb index.php |
Parse a string as an integer, encapsulating error handling.
None.
Variable I/O Description -------- --- -------------------------------------------------- string I String representing an integer. intval O Integer value obtained by parsing string.
string is a string representing an integer. Any string
acceptable to the CSPICE routine nparsi_ is
allowed.
intval is the integer obtained by parsing string.
None.
The purpose of this routine is to enable safe parsing of integers without the necessity of in-line error checking. This routine is based on the CSPICE routine nparsi_.
See the routine NPARSI for an examples of allowed strings.
None.
1) If the input string pointer is null, the error
SPICE(NULLPOINTER) will be signaled.
2) If the input string does not contain at least one character,
the error SPICE(EMPTYSTRING) will be signaled.
3) If the input string cannot be parsed, the error
SPICE(NOTANINTEGER) is signaled.
None.
N.J. Bachman (JPL)
None.
-CSPICE Version 1.1.1, 26-AUG-1999 (NJB)
Header was updated to list string exceptions.
-CSPICE Version 1.1.0, 08-FEB-1998 (NJB)
References to C2F_CreateStr_Sig were removed; code was
cleaned up accordingly. String checks are now done using
the macro CHKFSTR.
-CSPICE Version 1.0.0, 25-OCT-1997 (NJB)
parse integer with encapsulated error handling