summaryrefslogtreecommitdiff
path: root/lib/std/chartype.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-05-17 22:00:50 -0700
committerOri Bernstein <ori@eigenstate.org>2016-05-17 22:00:50 -0700
commit7aac15b2bfcc5eec279aa14f9f199685f9d7e0d9 (patch)
treec9434a55ea6850aee7103f608c6333cfe3148d60 /lib/std/chartype.myr
parentc96238b89583ed91e92ad909c507797d00015e95 (diff)
downloadmc-7aac15b2bfcc5eec279aa14f9f199685f9d7e0d9.tar.gz
New syntax for casts.
Diffstat (limited to 'lib/std/chartype.myr')
-rw-r--r--lib/std/chartype.myr8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/std/chartype.myr b/lib/std/chartype.myr
index 0e0b80d..60e6dd6 100644
--- a/lib/std/chartype.myr
+++ b/lib/std/chartype.myr
@@ -1228,14 +1228,14 @@ generic charval = {c, base -> @a::(numeric,integral)
var v = -1
if c >= '0' && c <= '9'
- v = (c - '0') castto(@a::(integral,numeric))
+ v = (c - '0' : @a::(integral,numeric))
elif c >= 'a' && c <= 'z'
- v = (c - 'a' + 10) castto(@a::(integral,numeric))
+ v = (c - 'a' + 10 : @a::(integral,numeric))
elif c >= 'A' && c <= 'Z'
- v = (c - 'A' + 10) castto(@a::(integral,numeric))
+ v = (c - 'A' + 10 : @a::(integral,numeric))
;;
- if v < 0 || v >= (base castto(@a::(integral,numeric)))
+ if v < 0 || v >= (base : @a::(integral,numeric))
-> -1
;;
-> v