Module ASCII: often used constants.
The module 'ASCII' is the home of the special characters of the ASCII characterset. Constants like 'LF', 'CR',
'EOF' are defined here. When the construct 'IMPORT ASCII;' is in the sourcefile, the constants can be referred
to as 'ASCII.LF', to name only one.
I made this module after being inspired by the FST library. Thanks Roger...
The ASCII sourcecode.
DEFINITION MODULE ASCII;
(* Borrowed from:
(C) Copyright 1987,1988
Fitted Software Tools.
All rights reserved. *)
CONST (* standard ASCII control character names *)
nul = 00C; soh = 01C; stx = 02C; etx = 03C;
eot = 04C; enq = 05C; ack = 06C; bel = 07C;
bs = 10C; ht = 11C; lf = 12C; vt = 13C;
ff = 14C; cr = 15C; so = 16C; si = 17C;
dle = 20C; dc1 = 21C; dc2 = 22C; dc3 = 23C;
dc4 = 24C; nak = 25C; syn = 26C; etb = 27C;
can = 30C; em = 31C; sub = 32C; esc = 33C;
fs = 34C; gs = 35C; rs = 36C; us = 37C;
del = 177C;
NUL = 00C; SOH = 01C; STX = 02C; ETX = 03C;
EOT = 04C; ENQ = 05C; ACK = 06C; BEL = 07C;
BS = 10C; HT = 11C; LF = 12C; VT = 13C;
FF = 14C; CR = 15C; SO = 16C; SI = 17C;
DLE = 20C; DC1 = 21C; DC2 = 22C; DC3 = 23C;
DC4 = 24C; NAK = 25C; SYN = 26C; ETB = 27C;
CAN = 30C; EM = 31C; SUB = 32C; ESC = 33C;
FS = 34C; GS = 35C; RS = 36C; US = 37C;
DEL = 177C;
(* what the control character combinations generate *)
CtrlA = 01C; CtrlB = 02C; CtrlC = 03C;
CtrlD = 04C; CtrlE = 05C; CtrlF = 06C; CtrlG = 07C;
CtrlH = 10C; CtrlI = 11C; CtrlJ = 12C; CtrlK = 13C;
CtrlL = 14C; CtrlM = 15C; CtrlN = 16C; CtrlO = 17C;
CtrlP = 20C; CtrlQ = 21C; CtrlR = 22C; CtrlS = 23C;
CtrlT = 24C; CtrlU = 25C; CtrlV = 26C; CtrlW = 27C;
CtrlX = 30C; CtrlY = 31C; CtrlZ = 32C;
EOL = 36C; (* Modula-2 end-of-line character *)
EOF = CtrlZ; (* end-of-file character for text files *)
END ASCII.
The 'DEFINITION MODULE' is just about the only part of this library module. It lists the 'ASCII' constants
both in upper- as in lowercase.
Implementation module
IMPLEMENTATION MODULE ASCII; (* (C) Copyright 1987,1988 Fitted Software Tools. All rights reserved. *) END ASCII.
Page created 2003,
Page equipped with FroogleBuster technology