aboutsummaryrefslogtreecommitdiff
path: root/elymas/lib/txt.ey
diff options
context:
space:
mode:
authorDrahflow <drahflow@gmx.de>2013-12-28 17:41:33 +0100
committerDrahflow <drahflow@gmx.de>2013-12-28 17:41:33 +0100
commitd245b90de88b762f65a5007c1776206dc7cd72dc (patch)
tree342e65618ef54cf788a10fd8e64ebd52579a5f25 /elymas/lib/txt.ey
parente57558ebe4635cb0183f94c50f9f61e8603807ff (diff)
Reducing memory footprint
Diffstat (limited to 'elymas/lib/txt.ey')
-rw-r--r--elymas/lib/txt.ey6
1 files changed, 6 insertions, 0 deletions
diff --git a/elymas/lib/txt.ey b/elymas/lib/txt.ey
index faae0ce..01bd495 100644
--- a/elymas/lib/txt.ey
+++ b/elymas/lib/txt.ey
@@ -27,6 +27,12 @@
{
_ { [ -01 10 math .base reverse "0123456789" each ] str .fromArray } { -- "0" } ? *
} [ 0 ] [ "" ] ' /u deffd
+
+ # 0 -> positive integer (or zero)
+ # 0 <- hexadecimal representation as string
+ {
+ _ { [ -01 16 math .base reverse "0123456789ABCDEF" each ] str .fromArray } { -- "0" } ? *
+ } [ 0 ] [ "" ] ' /hu deffd
> /produce defvd
> /txt defvd