diff options
author | Rich Hickey <richhickey@gmail.com> | 2006-05-08 15:18:19 +0000 |
---|---|---|
committer | Rich Hickey <richhickey@gmail.com> | 2006-05-08 15:18:19 +0000 |
commit | 89920242d109db57c30882e8eb2919533721c81f (patch) | |
tree | 30a75e07db8211ca3767ae99b9b08f28bf07834a /src | |
parent | cf9617cc1babdd110d99098d3c8ea1c7ee7f9e84 (diff) |
added byteValue and shortValue
Diffstat (limited to 'src')
-rw-r--r-- | src/cli/runtime/Num.cs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/cli/runtime/Num.cs b/src/cli/runtime/Num.cs index 32f451b7..682381f1 100644 --- a/src/cli/runtime/Num.cs +++ b/src/cli/runtime/Num.cs @@ -83,8 +83,18 @@ static public Num from(Object x) else throw new ArgumentException("Cannot convert argument: " + x + " to Num"); } - } - + }
+
+
+ virtual public byte byteValue()
+ {
+ return checked((byte)intValue());
+ }
+
+ virtual public short shortValue()
+ {
+ return checked((short)intValue());
+ } abstract public double doubleValue(); |