Some characters like { and } are part of the language. As a result, using them in the $asc identifier will break it. You can prevent that by setting the character to a variable and referencing the variable. Since the $asc identifier will only convert the first char anyway, it is recommended to set the variable to the same char multiple time. Ex: {{ Instead of {echo -a $chr(<decimal number>)
echo -a $asc(<ascii value>)
echo -a $asc({)
* Too many parameters: $asc
var %a {{
echo -a $asc(%a)
123
Dec | Oct | Hex | Binary | $chr(N) | Char |
---|---|---|---|---|---|
32 | 40 | 20 | 0100000 | $chr(32) | <space> |
33 | 41 | 21 | 0100001 | $chr(33) | ! |
34 | 42 | 22 | 0100010 | $chr(34) | " |
35 | 43 | 23 | 0100011 | $chr(35) | # |
36 | 44 | 24 | 0100100 | $chr(36) | $ |
37 | 45 | 25 | 0100101 | $chr(37) | % |
38 | 46 | 26 | 0100110 | $chr(38) | & |
39 | 47 | 27 | 0100111 | $chr(39) | ' |
40 | 50 | 28 | 0101000 | $chr(40) | ( |
41 | 51 | 29 | 0101001 | $chr(41) | ) |
42 | 52 | 2A | 0101010 | $chr(42) | * |
43 | 53 | 2B | 0101011 | $chr(43) | + |
44 | 54 | 2C | 0101100 | $chr(44) | , |
45 | 55 | 2D | 0101101 | $chr(45) | - |
46 | 56 | 2E | 0101110 | $chr(46) | . |
47 | 57 | 2F | 0101111 | $chr(47) | / |
48 | 60 | 30 | 0110000 | $chr(48) | 0 |
49 | 61 | 31 | 0110001 | $chr(49) | 1 |
50 | 62 | 32 | 0110010 | $chr(50) | 2 |
51 | 63 | 33 | 0110011 | $chr(51) | 3 |
52 | 64 | 34 | 0110100 | $chr(52) | 4 |
53 | 65 | 35 | 0110101 | $chr(53) | 5 |
54 | 66 | 36 | 0110110 | $chr(54) | 6 |
55 | 67 | 37 | 0110111 | $chr(55) | 7 |
56 | 70 | 38 | 0111000 | $chr(56) | 8 |
57 | 71 | 39 | 0111001 | $chr(57) | 9 |
58 | 72 | 3A | 0111010 | $chr(58) | : |
59 | 73 | 3B | 0111011 | $chr(59) | ; |
60 | 74 | 3C | 0111100 | $chr(60) | < |
61 | 75 | 3D | 0111101 | $chr(61) | = |
62 | 76 | 3E | 0111110 | $chr(62) | > |
63 | 77 | 3F | 0111111 | $chr(63) | ? |
64 | 100 | 40 | 1000000 | $chr(64) | @ |
65 | 101 | 41 | 1000001 | $chr(65) | A |
66 | 102 | 42 | 1000010 | $chr(66) | B |
67 | 103 | 43 | 1000011 | $chr(67) | C |
68 | 104 | 44 | 1000100 | $chr(68) | D |
69 | 105 | 45 | 1000101 | $chr(69) | E |
70 | 106 | 46 | 1000110 | $chr(70) | F |
71 | 107 | 47 | 1000111 | $chr(71) | G |
72 | 110 | 48 | 1001000 | $chr(72) | H |
73 | 111 | 49 | 1001001 | $chr(73) | I |
74 | 112 | 4A | 1001010 | $chr(74) | J |
75 | 113 | 4B | 1001011 | $chr(75) | K |
76 | 114 | 4C | 1001100 | $chr(76) | L |
77 | 115 | 4D | 1001101 | $chr(77) | M |
78 | 116 | 4E | 1001110 | $chr(78) | N |
79 | 117 | 4F | 1001111 | $chr(79) | O |
80 | 120 | 50 | 1010000 | $chr(80) | P |
81 | 121 | 51 | 1010001 | $chr(81) | Q |
82 | 122 | 52 | 1010010 | $chr(82) | R |
83 | 123 | 53 | 1010011 | $chr(83) | S |
84 | 124 | 54 | 1010100 | $chr(84) | T |
85 | 125 | 55 | 1010101 | $chr(85) | U |
86 | 126 | 56 | 1010110 | $chr(86) | V |
87 | 127 | 57 | 1010111 | $chr(87) | W |
88 | 130 | 58 | 1011000 | $chr(88) | X |
89 | 131 | 59 | 1011001 | $chr(89) | Y |
90 | 132 | 5A | 1011010 | $chr(90) | Z |
91 | 133 | 5B | 1011011 | $chr(91) | [ |
92 | 134 | 5C | 1011100 | $chr(92) | \ |
93 | 135 | 5D | 1011101 | $chr(93) | ] |
94 | 136 | 5E | 1011110 | $chr(94) | ^ |
95 | 137 | 5F | 1011111 | $chr(95) | _ |
96 | 140 | 60 | 1100000 | $chr(96) | ` |
97 | 141 | 61 | 1100001 | $chr(97) | a |
98 | 142 | 62 | 1100010 | $chr(98) | b |
99 | 143 | 63 | 1100011 | $chr(99) | c |
100 | 144 | 64 | 1100100 | $chr(100) | d |
101 | 145 | 65 | 1100101 | $chr(101) | e |
102 | 146 | 66 | 1100110 | $chr(102) | f |
103 | 147 | 67 | 1100111 | $chr(103) | g |
104 | 150 | 68 | 1101000 | $chr(104) | h |
105 | 151 | 69 | 1101001 | $chr(105) | i |
106 | 152 | 6A | 1101010 | $chr(106) | j |
107 | 153 | 6B | 1101011 | $chr(107) | k |
108 | 154 | 6C | 1101100 | $chr(108) | l |
109 | 155 | 6D | 1101101 | $chr(109) | m |
110 | 156 | 6E | 1101110 | $chr(110) | n |
111 | 157 | 6F | 1101111 | $chr(111) | o |
112 | 160 | 70 | 1110000 | $chr(112) | p |
113 | 161 | 71 | 1110001 | $chr(113) | q |
114 | 162 | 72 | 1110010 | $chr(114) | r |
115 | 163 | 73 | 1110011 | $chr(115) | s |
116 | 164 | 74 | 1110100 | $chr(116) | t |
117 | 165 | 75 | 1110101 | $chr(117) | u |
118 | 166 | 76 | 1110110 | $chr(118) | v |
119 | 167 | 77 | 1110111 | $chr(119) | w |
120 | 170 | 78 | 1111000 | $chr(120) | x |
121 | 171 | 79 | 1111001 | $chr(121) | y |
122 | 172 | 7A | 1111010 | $chr(122) | z |
123 | 173 | 7B | 1111011 | $chr(123) | { |
124 | 174 | 7C | 1111100 | $chr(124) | | |
125 | 175 | 7D | 1111101 | $chr(125) | } |
126 | 176 | 7E | 1111110 | $chr(126) | ~ |
127 | 177 | 7F | 1111111 | $chr(127) | <Delete Key> |
0 komentar:
Post a Comment