[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] mystrtonum for any awk (Was: Handling hexadecimals in dif
From: |
Jarno Suni |
Subject: |
Re: [bug-gawk] mystrtonum for any awk (Was: Handling hexadecimals in different modes) |
Date: |
Tue, 29 Sep 2015 08:05:09 +0300 |
On Sun, 27 Sep 2015 13:25:14 +0300
Jarno Suni <address@hidden> wrote:
> digits="0123456789abcdefghijklmnopqrstuvwxyz"
> ld=length(digits) # maximum base (36)
> # Create a lookup table for values of digits:
> for(i=0; i<length(digits); i++) v[substr(digits,i+1,1)]=i
> # Upper case digits are equal to lower case:
> for(i=10; i<length(digits); i++)
> v[toupper(substr(digits,i+1,1))]=i d=substr(sprintf("%g",1.1),2,1); #
BTW. Bash allows even bigger base, but it is case sensitive:
http://wiki.bash-hackers.org/syntax/arith_expr#different_bases
--
Jarno Ilari Suni - http://www.iki.fi/8/
- Re: [bug-gawk] Handling hexadecimals in different modes, Jarno Suni, 2015/09/01
- Re: [bug-gawk] Handling hexadecimals in different modes, Jarno Suni, 2015/09/06
- Re: [bug-gawk] Handling hexadecimals in different modes, Jarno Suni, 2015/09/07
- Re: [bug-gawk] Handling hexadecimals in different modes, arnold, 2015/09/08
- Re: [bug-gawk] Handling hexadecimals in different modes, Jarno Suni, 2015/09/09
- Re: [bug-gawk] mystrtonum for any awk (Was: Handling hexadecimals in different modes), Jarno Suni, 2015/09/22
- Re: [bug-gawk] mystrtonum for any awk (Was: Handling hexadecimals in different modes), Jarno Suni, 2015/09/22
- Message not available
- Re: [bug-gawk] mystrtonum for any awk (Was: Handling hexadecimals in different modes), Jarno Suni, 2015/09/25
- Message not available
- Re: [bug-gawk] mystrtonum for any awk (Was: Handling hexadecimals in different modes), Jarno Suni, 2015/09/27
- Re: [bug-gawk] mystrtonum for any awk (Was: Handling hexadecimals in different modes),
Jarno Suni <=
- Re: [bug-gawk] Handling hexadecimals in different modes, Jarno Suni, 2015/09/14
- Re: [bug-gawk] Handling hexadecimals in different modes, Aharon Robbins, 2015/09/15