Hey, I need my ASCII table values to start from 0 and go to 7, then start from 8 and go to 15, then start from 16 and go to 23, then 24 to 31 and so on for part 1 and 128 to 135, 136 to 143 and so on for part 2. However, I don't know how to get it with my written code. Can someone please tell me where I am doing it wrong or what I might have to change? The program I have is this:
ASCII codes: Part 1
0 1 2 3 4 5 6 7 8
9 10
11
12
14 15 16
17 18 19 20 21 22 23 24
25 26 27 28 29 30 31 32
33 ! 34 " 35 # 36 $ 37 % 38 & 39 ' 40 (
41 ) 42 * 43 + 44 , 45 - 46 . 47 / 48 0
49 1 50 2 51 3 52 4 53 5 54 6 55 7 56 8
57 9 58 : 59 ; 60 < 61 = 62 > 63 ? 64 @
65 A 66 B 67 C 68 D 69 E 70 F 71 G 72 H
73 I 74 J 75 K 76 L 77 M 78 N 79 O 80 P
81 Q 82 R 83 S 84 T 85 U 86 V 87 W 88 X
89 Y 90 Z 91 [ 92 \ 93 ] 94 ^ 95 _ 96 `
97 a 98 b 99 c 100 d 101 e 102 f 103 g 104 h
105 i 106 j 107 k 108 l 109 m 110 n 111 o 112 p
113 q 114 r 115 s 116 t 117 u 118 v 119 w 120 x
121 y 122 z 123 { 124 | 125 } 126 ~ 127
ASCII codes: Part 2
128 ? 129 ? 130 ? 131 ? 132 ? 133 ? 134 ? 135 ? 136 ?
137 ? 138 ? 139 ? 140 ? 141 ? 142 ? 143 ? 144 ?
145 ? 146 ? 147 ? 148 ? 149 ? 150 ? 151 ? 152 ?
153 ? 154 ? 155 ? 156 ? 157 ? 158 ? 159 ? 160 ?
161 ? 162 ? 163 ? 164 ? 165 ? 166 ? 167 ? 168 ?
169 ? 170 ? 171 ? 172 ? 173 ? 174 ? 175 ? 176 ?
177 ? 178 ? 179 ? 180 ? 181 ? 182 ? 183 ? 184 ?
185 ? 186 ? 187 ? 188 ? 189 ? 190 ? 191 ? 192 ?
193 ? 194 ? 195 ? 196 ? 197 ? 198 ? 199 ? 200 ?
201 ? 202 ? 203 ? 204 ? 205 ? 206 ? 207 ? 208 ?
209 ? 210 ? 211 ? 212 ? 213 ? 214 ? 215 ? 216 ?
217 ? 218 ? 219 ? 220 ? 221 ? 222 ? 223 ? 224 ?
225 ? 226 ? 227 ? 228 ? 229 ? 230 ? 231 ? 232 ?
233 ? 234 ? 235 ? 236 ? 237 ? 238 ? 239 ? 240 ?
241 ? 242 ? 243 ? 244 ? 245 ? 246 ? 247 ? 248 ?
249 ? 250 ? 251 ? 252 ? 253 ? 254 ? 255 ?
I am running this program on mac os and am also trying to figure out how to print ASCII symbols. Because Im running c++ (g++ compiler on mac) it apparently does not have ASCII symbols or at least not all of them. I do understand that my only option might be to transfer the code to windows os and try it there. However, if you know how I could print it in mac - please share. Also pardon for long message!
10 and 13 (decimal) are both end of lines. Dos/win actually uses BOTH on every line.
128+ should print in a console; they are mostly "console box drawing" symbols + a few others.
0 is end of string. Can't print this.
A number of symbols from 0 to 20 are not printable at all, like the PC speaker beep (/bel ) symbol, and some are for serial port comms and other old things. (your program should have beeped your speakers!).
It has nothing to do with a mac. The ascii table is standard (that is the s in ascii!) and the same on all systems. It has to do with symbols that are simply not meant to be printed, they are for other purposes.
Are you printing to a window or to a console? Windows sometimes have a layer that can't handle the 128 + symbols. Try printing them to a text file, and opening that in a program that CAN display them.
You are not doing anything wrong. You just have to understand what you are working with here.
Thanks jonnin, I am printing them to a console. I more or less understand what you are saying, however, what you mean by understand what you are working with?
Considering my code, is it possible to start values from 0 to 7, then start from 8 and go to 15. That way my code would work. Would anyone help me so I would have 8 symbols in a row for all ASCII symbols. Currently not showing them is not the biggest problem. I will tackle it once i know how to represent 8 symbols in a row. Any suggestions?
Whoever made that web page doesn't know what they were talking about. The third column has nothing to do with ASCII. It appears to be IBM CP 850 https://en.wikipedia.org/wiki/Code_page_850 (not even CP 437 which that web page mentions in the text below)
The thing is that I need to print all 255 ASCII symbols in the same manner and for this problem it shows all symbols from 0 to 30 as symbols except for 0 and 8. Thank you for the 8 symbols help. It shows up now. However, now I need to print all 255 ASCII symbols in mac. How could I do it? Thank you very much for help. I'll look forward to your replies!
Figured it out with while loop. Thanks TheIdeasMan! Now, how it would be possible to get all 255 ASCII symbols on mac terminal? Or should I use text file or another editor? Maybe someone knows which text editor I should use on mac? Thanks. I'll look forward to your replies!