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 /txr.1 | |
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 'txr.1')
-rw-r--r-- | txr.1 | 21 |
1 files changed, 18 insertions, 3 deletions
@@ -45805,21 +45805,36 @@ is equivalent to .coIP b Converts a string value holding a binary (base two) representation to the integer which it denotes. The expression -.code "(c str)" +.code "(b str)" is equivalent to .codn "(toint str 2)" . +.coIP c +Converts a string value holding a C-language-style representation +to the integer which it denotes, meaning that the +.code 0x +prefix denotes a hexadecimal value, a leading zero octal, otherwise +decimal. These prefixes follow the +.code + +or +.code - +sign, if present. +The expression +.code "(c str)" +is equivalent to +.codn "(toint str #\ec)" . .coIP r Converts a string holding a floating-point representation to the floating-point value which it denotes. The expression .code "(r str)" is equivalent to .codn "(tofloat str)" . -.ccIP @, iz @, oz @, xz @ bz and @ rz +.ccIP @, iz @, oz @, xz @, bz @ cz and @ rz Conversion similar to .codn i , .codn o , .codn x , -.code b +.codn b , +.code c and .codn r , but using |