home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
OL.LZH
/
PROCS.LZH
/
ASCIINAM.ICN
< prev
next >
Wrap
Text File
|
1991-07-13
|
779b
|
29 lines
############################################################################
#
# Name: asciiname (asciinam.icn)
#
# Title: ASCII "name" of unprintable character.
#
# Author: Robert J. Alexander
#
# Date: September 7, 1990
#
############################################################################
#
# asciiname -- Procedure to return mnemonic name of ascii non-printable
# characters.
#
procedure asciiname(s)
local o
static names
initial {
names := ["NUL","SOH","STX","ETX","EOT","ENQ","ACK","BEL",
"BS" ,"HT" ,"NL" ,"VT" ,"NP" ,"CR" ,"SO" ,"SI" ,
"DLE","DC1","DC2","DC3","DC4","NAK","SYN","ETB",
"CAN","EM" ,"SUB","ESC","FS" ,"GS" ,"RS" ,"US" ]
}
o := ord(s)
return names[o + 1] | (if o = 127 then "DEL")
end