gast@lanai.cs.ucla.edu (David Gast) (03/13/91)
In article <40012@cup.portal.com> ts@cup.portal.com (Tim W Smith) writes: >>> Because the vast majority of programmers have no need to know the ASCII >>> code. >>Exactly right. The vast majority of programmers are coding in COBOL on >>machines that use EBCDIC. >Unless you program like [below] you rarely need to know ASCII codes. > unsigned char main[] = { 12, 17, 97, 243, 122 }; I have never programmed like that, but I can think of many examples where it is necessary to know the ASCII code. 1) You have to send some control characters to the printer and the language you are using does not allow the mnemonics the printer manual uses (for example, ^G or cntrl-G or BELL). 2) You need to position the cursor on the screen and the computer does not have something like curses. 3) You are running a communications program and that program uses different mnemonics than you do. 4) You want to use a program like sort and you need to determine the exact sort order. 5) You have to write code that works under ASCII and EBCDIC. 6) You need to interpret the output of od. 6) The list goes on for quite some time. Perhaps the above constitute rarely; I supppose it depends on what code you are writing. David