summaryrefslogtreecommitdiff
path: root/src/number.h
diff options
context:
space:
mode:
authorMike Buland <mike@xagasoft.com>2013-04-23 10:24:18 -0600
committerMike Buland <mike@xagasoft.com>2013-04-23 10:24:18 -0600
commite6401f9af190cfbaaab1dc5589546ba5cc2f5293 (patch)
treef77f3d8d1068971e46a51394a345b780b1ebd6bc /src/number.h
parent3c8dbfe5bb53b8cca319d64a64450e1360a9911d (diff)
downloadclic-e6401f9af190cfbaaab1dc5589546ba5cc2f5293.tar.gz
clic-e6401f9af190cfbaaab1dc5589546ba5cc2f5293.tar.bz2
clic-e6401f9af190cfbaaab1dc5589546ba5cc2f5293.tar.xz
clic-e6401f9af190cfbaaab1dc5589546ba5cc2f5293.zip
Added == operator to compare Numbers & strings
We may be able to go even a step further, but it actually parses the string as a number with the same radix and scale as the left hand side of the equation and then compares them as Numbers. This means that it's actually more resiliant to minor formatting differences.
Diffstat (limited to '')
-rw-r--r--src/number.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/number.h b/src/number.h
index 0816a17..8077fe0 100644
--- a/src/number.h
+++ b/src/number.h
@@ -21,6 +21,7 @@ public:
21 Number operator%( const Number &rhs ) const; 21 Number operator%( const Number &rhs ) const;
22 Number operator-() const; 22 Number operator-() const;
23 23
24 bool operator==( const Bu::String &rhs ) const;
24 bool operator==( const Number &rhs ) const; 25 bool operator==( const Number &rhs ) const;
25 bool operator!=( const Number &rhs ) const; 26 bool operator!=( const Number &rhs ) const;
26 bool operator>( const Number &rhs ) const; 27 bool operator>( const Number &rhs ) const;