diff options
author | Mike Buland <mike@xagasoft.com> | 2013-05-10 09:28:46 -0600 |
---|---|---|
committer | Mike Buland <mike@xagasoft.com> | 2013-05-10 09:28:46 -0600 |
commit | ca9956381009cbe2d36ea8516d51516f7c49b9d3 (patch) | |
tree | e2dd13683057c16465be054862cdd91fee1bca2a /src | |
parent | dc0139c1880d1500b3e275b09781116613862f5f (diff) | |
download | clic-ca9956381009cbe2d36ea8516d51516f7c49b9d3.tar.gz clic-ca9956381009cbe2d36ea8516d51516f7c49b9d3.tar.bz2 clic-ca9956381009cbe2d36ea8516d51516f7c49b9d3.tar.xz clic-ca9956381009cbe2d36ea8516d51516f7c49b9d3.zip |
Added more helpers to Number.0.07
Diffstat (limited to '')
-rw-r--r-- | src/main.cpp | 2 | ||||
-rw-r--r-- | src/number.cpp | 6 | ||||
-rw-r--r-- | src/number.h | 1 |
3 files changed, 8 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index 4c34453..7c3e30f 100644 --- a/src/main.cpp +++ b/src/main.cpp | |||
@@ -17,7 +17,7 @@ int main( int argc, char *argv[] ) | |||
17 | { | 17 | { |
18 | Options opt( argc, argv ); | 18 | Options opt( argc, argv ); |
19 | 19 | ||
20 | println("CliC - 0.06"); | 20 | println("CliC - 0.07"); |
21 | println("Try \\exit, \\help, \\scale, and \\radix commands."); | 21 | println("Try \\exit, \\help, \\scale, and \\radix commands."); |
22 | println(""); | 22 | println(""); |
23 | 23 | ||
diff --git a/src/number.cpp b/src/number.cpp index cda829e..1b0efdc 100644 --- a/src/number.cpp +++ b/src/number.cpp | |||
@@ -45,6 +45,12 @@ Number &Number::operator=( const Number &rhs ) | |||
45 | return *this; | 45 | return *this; |
46 | } | 46 | } |
47 | 47 | ||
48 | Number &Number::operator=( const int32_t iNum ) | ||
49 | { | ||
50 | set( iNum ); | ||
51 | return *this; | ||
52 | } | ||
53 | |||
48 | Number Number::operator+( const Number &rhs ) const | 54 | Number Number::operator+( const Number &rhs ) const |
49 | { | 55 | { |
50 | return add( rhs, false ); | 56 | return add( rhs, false ); |
diff --git a/src/number.h b/src/number.h index 2abf0e1..40dbd55 100644 --- a/src/number.h +++ b/src/number.h | |||
@@ -13,6 +13,7 @@ public: | |||
13 | 13 | ||
14 | Number &operator=( const Bu::String &sNum ); | 14 | Number &operator=( const Bu::String &sNum ); |
15 | Number &operator=( const Number &rhs ); | 15 | Number &operator=( const Number &rhs ); |
16 | Number &operator=( const int32_t iNum ); | ||
16 | 17 | ||
17 | Number operator+( const Number &rhs ) const; | 18 | Number operator+( const Number &rhs ) const; |
18 | Number operator-( const Number &rhs ) const; | 19 | Number operator-( const Number &rhs ) const; |