8.2. Numerical Constants
1、Example 8-4. Representation of numerical constants
同C语言一样,字符也是整数。但是@和_代表是多少不知道?而且把它们转化为十进制的方法忘记了。
32 let "b64 = 64#@_"
33 echo "base-64 number = $b64" # 4031
34 # This notation only works for a limited range (2 - 64) of ASCII characters 35 # 10 digits + 26 lowercase characters + 26 uppercase characters + @ + _
36
37
38 echo
39
40 echo $((36#zz)) $((2#10101010)) $((16#AF16)) $((53#1aA))
41 # 1295 170 44822 3375
英语疑难: evaluates
A number with an embedded # evaluates as BASE#NUMBER (with range and notational restrictions).