diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-06-12 20:07:54 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-06-12 20:07:54 -0700 |
commit | b0bd42d32276eb37cbd6175915c9e5ada6213486 (patch) | |
tree | 4f686ce8af49ba2f59eddd5604b75cdcb22bd7f4 /share | |
parent | 9afe98ddd7506561f70b4356fbde69731e339042 (diff) | |
download | txr-b0bd42d32276eb37cbd6175915c9e5ada6213486.tar.gz txr-b0bd42d32276eb37cbd6175915c9e5ada6213486.tar.bz2 txr-b0bd42d32276eb37cbd6175915c9e5ada6213486.zip |
awk macro: new fconv conversions c and cz.
* share/txr/stdlib/conv.tl (sys:conv-let): New
local functions c and cz, using the new #\c
radix conversion.
* txr.1: Documented new extension under the fconv
awk macro. Also fixed a typo here; the b conversion
was exemplified as (c str).
Diffstat (limited to 'share')
-rw-r--r-- | share/txr/stdlib/conv.tl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/share/txr/stdlib/conv.tl b/share/txr/stdlib/conv.tl index 88a8fb95..e373e3dc 100644 --- a/share/txr/stdlib/conv.tl +++ b/share/txr/stdlib/conv.tl @@ -33,6 +33,8 @@ (toint arg 16)) (b (arg) (toint arg 2)) + (c (arg) + (toint arg #\c)) (r (arg) (tofloat arg)) (iz (arg : radix) @@ -43,6 +45,8 @@ (tointz arg 16)) (bz (arg) (tointz arg 2)) + (cz (arg) + (tointz arg #\c)) (rz (arg) (tofloatz arg))) ,*body)) |