From d54fe7c1f704a63824c5bfa0ece65245572e9b27 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 4 Mar 2015 21:21:30 -0500 Subject: Initial commit --- src/slalib/sun67.htx/node122.html | 170 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 170 insertions(+) create mode 100644 src/slalib/sun67.htx/node122.html (limited to 'src/slalib/sun67.htx/node122.html') diff --git a/src/slalib/sun67.htx/node122.html b/src/slalib/sun67.htx/node122.html new file mode 100644 index 0000000..b06d5d3 --- /dev/null +++ b/src/slalib/sun67.htx/node122.html @@ -0,0 +1,170 @@ + + + + +SLA_INTIN - Decode an Integer Number + + + + + + + + + + + + +

+ +next + +up + +previous +
+ Next: SLA_INVF - Invert Linear Model +
+Up: SUBPROGRAM SPECIFICATIONS +
+ Previous: SLA_IMXV - Apply 3D Reverse Rotation +

+

+

SLA_INTIN - Decode an Integer Number +   +

+
+
ACTION: +
Convert free-format input into an integer. +
CALL: +
CALL sla_INTIN (STRING, NSTRT, IRESLT, JFLAG) +

+

+
GIVEN: +
+
+ + + + + + + + + + + + + +
STRINGCstring containing number to be decoded
NSTRTIpointer to where decoding is to commence
IRESLTIcurrent value of result
+

+
RETURNED: +
+
+ + + + + + + + + + + + + +
NSTRTIadvanced to next number
IRESLTIresult
JFLAGIstatus: -1 = -OK, 0 = +OK, 1 = null result, 2 = error
+

+
NOTES: +
+
1. +
The reason sla_INTIN has separate `OK' status values +for + and - is to enable minus zero to be detected. +This is of crucial importance + when decoding mixed-radix numbers. For example, an angle + expressed as degrees, arcminutes and arcseconds may have a + leading minus sign but a zero degrees field. +
2. +
A TAB is interpreted as a space. n.b. The test for TAB is + ASCII-specific. +
3. +
The basic format is the sequence of fields $\pm n$, where $\pm$ is a sign + character `+' or `-', and n means a string of decimal digits. +
4. +
Spaces: +
    +
  • Leading spaces are ignored. +
  • Spaces between the sign and the number are allowed. +
  • Trailing spaces are ignored; the first signifies + end of decoding and subsequent ones are skipped. +
+
5. +
Delimiters: +
    +
  • Any character other than +,-,0-9 or space may be + used to signal the end of the number and terminate decoding. +
  • Comma is recognized by sla_INTIN as a special case; it + is skipped, leaving the pointer on the next character. See + 9, below. +
  • Decoding will in all cases terminate if end of string + is reached. +
+
6. +
The sign is optional. The default is +. +
7. +
A null result occurs when the string of characters + being decoded does not begin with +,- or 0-9, or + consists entirely of spaces. When this condition is + detected, JFLAG is set to 1 and IRESLT is left untouched. +
8. +
NSTRT = 1 for the first character in the string. +
9. +
On return from sla_INTIN, NSTRT is set ready for the next + decode - following trailing blanks and any comma. If a + delimiter other than comma is being used, NSTRT must be + incremented before the next call to sla_INTIN, otherwise + all subsequent calls will return a null result. +
10. +
Errors (JFLAG=2) occur when: +
    +
  • there is a + or - but no number; or +
  • the number is greater than 231-1. +
+
11. +
When an error has been detected, NSTRT is left + pointing to the character following the last + one used before the error came to light. +
12. +
See also sla_FLOTIN and sla_DFLTIN. +
+

+ +next + +up + +previous +
+ Next: SLA_INVF - Invert Linear Model +
+Up: SUBPROGRAM SPECIFICATIONS +
+ Previous: SLA_IMXV - Apply 3D Reverse Rotation +

+

+

+SLALIB --- Positional Astronomy Library
Starlink User Note 67
P. T. Wallace
12 October 1999
E-mail:ptw@star.rl.ac.uk
+
+ + -- cgit