> as "123456789123" (which represents a number which is too large for a 32
> bit integer) and returning -1097262461 with CSTAT == 0.
Has CHR_CTOI always done this? The documentation is vague: STATUS is
set "if the routine does not complete successfully" but not discussing
any specific errors or special error codes, such as a CHR__OVFLW that
could be checked. The F77 standard says IOSTAT is returned
with a processor-dependent positive integer value if an error condition
is encountered. In the VMS Fortran an error occurs when "the value of
an external field exceeds the range of the corresponding list element".
> Should CHR_CTOI perform a check by re-formatting the returned integer
> and seeing if the resulting string looks like the supplied string?
>
> A bit of a performance hit, I admit. Any other ideas?
SUN/40 does warn that CHR_CTOx is (already) slow.
Do you need to test more than the first character, i.e. for a change of
sign?
I suppose storing the equivalent VAL__MINI and VAL__MAXI as strings
and testing the supplied string against those is a no-no.
Constraining the I<n> in the format to not exceed the valid length of
integers only helps if the number is a few times too big.
Could we have a TYPE parameter in FITSMOD that defaults to null, but if
set, is attempted before the exisiting documented order in "Value Data
Type" section? I've not reacquainted myself with the code to see how
easy that would be.
Malcolm
|