summaryrefslogtreecommitdiff
path: root/src/number.h
diff options
context:
space:
mode:
authorMike Buland <mike@xagasoft.com>2013-04-16 14:41:14 -0600
committerMike Buland <mike@xagasoft.com>2013-04-16 14:41:14 -0600
commit7cfca326d8f824d3749ece6ad63a793197bf6c9d (patch)
treefcde2eb8a7e479e6e4cfb3c88cd4c7d5828b5aa6 /src/number.h
parent0e95be4d89b394315a969814a77e08ed358261d6 (diff)
downloadclic-7cfca326d8f824d3749ece6ad63a793197bf6c9d.tar.gz
clic-7cfca326d8f824d3749ece6ad63a793197bf6c9d.tar.bz2
clic-7cfca326d8f824d3749ece6ad63a793197bf6c9d.tar.xz
clic-7cfca326d8f824d3749ece6ad63a793197bf6c9d.zip
Full support for arbitrary radixes is in place.
It computes the radix and bitwidth dynamically, we could probably speed that up another step by simply having a table of common ones, but for now it'll work for anything.
Diffstat (limited to '')
-rw-r--r--src/number.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/number.h b/src/number.h
index ee000a8..8d98a1b 100644
--- a/src/number.h
+++ b/src/number.h
@@ -7,8 +7,8 @@
7class Number 7class Number
8{ 8{
9public: 9public:
10 Number( int iOrd=0 ); 10 Number( int iRadix=10, int iOrd=0 );
11 Number( const Bu::String &sData, int iOrd=0 ); 11 Number( const Bu::String &sData, int iRadix=10, int iOrd=0 );
12 virtual ~Number(); 12 virtual ~Number();
13 13
14 Number &operator=( const Bu::String &sNum ); 14 Number &operator=( const Bu::String &sNum );
@@ -46,6 +46,7 @@ private:
46 Number add( const Number &rhs, bool bSub ) const; 46 Number add( const Number &rhs, bool bSub ) const;
47 47
48private: 48private:
49 int iRadix;
49 int iOrd; 50 int iOrd;
50 bool bPositive; 51 bool bPositive;
51 PackedIntArray aInt; 52 PackedIntArray aInt;