00001 #include "MusimatTutorial.h" 00002 MusimatTutorialSection(B0300) { 00003 Print("*** B.3 Unicode (ASCII) Character Codes ***"); 00004 /***************************************************************************** 00005 00006 B.3 Unicode (ASCII) Character Codes 00007 00008 The Universal Character Set, or Unicode, encodes virtually all of the world's characters and even 00009 leaves room for characters not yet invented. A common subset of Unicode is ASCII (American Stan- 00010 dard Code for Information Interchange), which was proposed by ANSI in 1963 and adopted in 1968. 00011 Recent standards that refer to ASCII include ISO-14962-1997 and ANSI-X3.4-1986 (R1997). The 00012 ASCII code includes many punctuation marks and white space such as blank, tab, and newline 00013 (which forces subsequent text onto a new line). 00014 00015 Table B.1 00016 ASCII Character Codes 00017 00018 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 00019 0 NUL SOH STX ETX EOT ENQ ACK BEL BS HT LF VT FF CR SO SI 00020 1 DLE DC1 DC2 DC3 DC4 NAK SYN ETB CAN EM SUB ESC FS GS RS US 00021 2 SP ! " # $ % & ' ( ) * + , - . / 00022 3 0 1 2 3 4 5 6 7 8 9 : ; < = > ? 00023 4 @ A B C D E F G H I J K L M N O 00024 5 P Q R S T U V W X Y Z [ \ ] ^ _ 00025 6 ` a b c d e f g h i j k l m n o 00026 7 p q r s t u v w x y z { | } ~ DEL 00027 00028 00029 To obtain the integer ASCII number corresponding to a character, first find the row r and column 00030 c containing the character in table B.1. The ASCII number of this character is . For example, 00031 the character ‘A' corresponds to . 00032 00033 The characters between 0 and 31 and DEL are reserved for functions that mostly don't concern 00034 computer users, except for CR (carriage return) and LF (line feed). SP stands for the space 00035 character ' '. This is another one of those tables that you must learn if you expect your geek friends 00036 to take you seriously, so place a copy of table B.1 at your bedside or above the mantelpiece, where 00037 you can refer to it frequently. 00038 *****************************************************************************/ 00039 00040 For (Integer i = 32; i < 128; i++) 00041 Print(Character(i)); 00042 00043 } 00044 00046 /* $Revision: 1.2 $ $Date: 2006/09/05 06:32:26 $ $Author: dgl $ $Name: $ $Id: B0300.cpp,v 1.2 2006/09/05 06:32:26 dgl Exp $ */ 00047 // The Musimat Tutorial © 2006 Gareth Loy 00048 // Derived from Chapter 9 and Appendix B of "Musimathics Vol. 1" © 2006 Gareth Loy 00049 // and published exclusively by The MIT Press. 00050 // This program is released WITHOUT ANY WARRANTY; without even the implied 00051 // warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00052 // For information on usage and redistribution, and for a DISCLAIMER OF ALL 00053 // WARRANTIES, see the file, "LICENSE.txt," in this distribution. 00054 // "Musimathics" is available here: http://mitpress.mit.edu/catalog/item/default.asp?ttype=2&tid=10916 00055 // Gareth Loy's Musimathics website: http://www.musimathics.com/ 00056 // The Musimat website: http://www.musimat.com/ 00057 // This program is released under the terms of the GNU General Public License 00058 // available here: http://www.gnu.org/licenses/gpl.txt 00059