File: STdecNint.html

package info (click to toggle)
libtsp 3r0-1
  • links: PTS
  • area: non-free
  • in suites: potato, woody
  • size: 5,096 kB
  • ctags: 1,798
  • sloc: ansic: 14,464; sh: 1,217; makefile: 182
file content (74 lines) | stat: -rw-r--r-- 1,929 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<HTML>
<HEAD>
<TITLE>TSP (libtsp/ST) - STdecNint</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFACD">
<H2>STdecNint</H2>
<HR>
<H4>Routine</H4>
<DL>
<DT>
int STdecNint (const char String[], int Nmin, int Nmax, int Ival[],
int *N)
</DL>
<H4>Purpose</H4>
<DL>
<DT>
Decode integer values (variable number)
</DL>
<H4>Description</H4>
This routine decodes a string containing numeric data.  Multiple data items
data items in the string are separated by commas or white-space (as defined
by the isspace routine).  The decoded data is stored as integer values.  If
the number of data values in the string is less than a given minimum number
or a decoding error is detected, an error message is printed and an error
indication is returned.  A warning messages is printed if extra data follows
the requested values (this data is ignored).
<H4>Parameters</H4>
<DL>
<DT>
&lt;-  int STdecNint
<DD>
Error status,
<PRE>
  0 - no error
  1 - error, too few values or data format error
  2 - warning, data values too large or too small
</PRE>
<DT>
 -&gt; const char String[]
<DD>
Input string
<DT>
 -&gt; int Nmin
<DD>
Minimum number of values to be read (may be zero)
<DT>
 -&gt; int Nmax
<DD>
Maximum number of values to be read
<DT>
&lt;-  int Ival[]
<DD>
Array of Nmax elements used to store the decoded values.  Only the first
N values are modified.
<DT>
&lt;-  int *N
<DD>
Actual number of values decoded.  In the case of an error, N indicates
the number of values successfully decoded.  In that case, N may be less
than Nmin.
</DL>
<H4>Author / revision</H4>
P. Kabal  Copyright (C) 1997
/ Revision 1.23  1997/10/13
<H4>See Also</H4>
<A HREF="STdec1int.html">STdec1int</A>,
<A HREF="STdecNdouble.html">STdecNdouble</A>,
<A HREF="STdecNfloat.html">STdecNfloat</A>,
<A HREF="STdecNlong.html">STdecNlong</A>
<P>
<HR>
Main Index <A HREF="../libtsp.html">libtsp</A>
</BODY>
</HTML>