]> www.ginac.de Git - cln.git/blob - src/integer/input/cl_I_readparsed.cc
* All Files have been modified for inclusion of namespace cln;
[cln.git] / src / integer / input / cl_I_readparsed.cc
1 // read_integer().
2
3 // General includes.
4 #include "cl_sysdep.h"
5
6 // Specification.
7 #include "cln/integer_io.h"
8
9
10 // Implementation.
11
12 #include "cl_I.h"
13
14 namespace cln {
15
16 const cl_I read_integer (unsigned int base, cl_signean sign, const char * string, uintL index1, uintL index2)
17 {
18         var cl_I x = digits_to_I(&string[index1],index2-index1,(uintD)base);
19         if (sign == 0)
20                 return x;
21         else
22                 return -x; // negatives Vorzeichen -> Vorzeichenwechsel
23 }
24
25 }  // namespace cln