home *** CD-ROM | disk | FTP | other *** search
- ############################################################################
- #
- # File: asciiname (asciinam.icn)
- #
- # Subject: Procedure for 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
-