Re: Linefeed character in SBCL



Kent M Pitman <pitman@xxxxxxxxxxx> wrote:
+---------------
| http://common-lisp.net/project/bknr/static/lmman/fd-str.xml
| Note that the codes there are shown in octal, not decimal, which was
| for a very long time the default ibase/base for Zetalisp, and that in
| octal LF is 12 and CR is 15. Note also that Return is 215 OCTAL, that
| is, an ASCII CR with the 200 octal bit (010 000 000 binary) set. (The
| number of codes that had the 200 bit set on top of what would have
| been the ASCII coding is something I never really noticed until just
| this minute looking at that table, but I'm quite sure it was not
| accidental.
+---------------

Heh! For a second I thought it was just "7+1" even parity,
which was once upon a time the most common flavor of ASCII
used for Teletypes:

> (defun even-parity/7+1 (x)
(let ((x7 (logand x #o177)))
(+ x7 (if (oddp (logcount x7)) #o200 0))))

EVEN-PARITY/7+1
> (write (mapcar 'even-parity/7+1 (iota 16 8)) :base 8)
(210 11 12 213 14 215 216 17 220 21 22 223 24 225 226 27)
(136 9 10 139 12 141 142 15 144 17 18 147 20 149 150 23)
>

But looking at the URL you reference shows that that's incorrect.
Zetalisp just stuck all the "control" codes up at #o200+x for its
own weird reasons, and the fact that "x" happens to match the
corresponding ASCII control code for just a few of them was just a
convenience for the designers (and confusion for everyone else!).


-Rob

-----
Rob Warnock <rpw3@xxxxxxxx>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607

.



Relevant Pages

  • Re: A note on computing thugs and coding bums
    ... Your refusal to accept reality in this regard seems to be ... ASCII is presented as a seven-bit code. ... evil potential as Christian fundamentalism (or Islamic fundamentalism, ... use 32-bit bytes to store ASCII codes. ...
    (comp.programming)
  • Re: Open Source on OpenVMS - A Progress Report
    ... *english* alphabet or that it must be 7-bit plain ASCII. ... ASCII codes must be stripped of those characters or encoded somehow to ... codes, Google Groups does so, and encodes with MIME using Quoted- ...
    (comp.os.vms)
  • Re: Open Source on OpenVMS - A Progress Report
    ... only supporting characters that happens to be in the ... *english* alphabet or that it must be 7-bit plain ASCII. ... ASCII codes must be stripped of those characters or encoded somehow to ... codes, Google Groups does so, and encodes with MIME using Quoted- ...
    (comp.os.vms)
  • Re: ASCII export?
    ... which includes ASCII, and the help file of FM says that exporting as ... ASCII control / command codes. ... You can read about GSAR at ...
    (comp.databases.filemaker)
  • Re: PCL images and mvEnterprise
    ... Then import that ascii file to a pick ... codes to invoke that macro as a watermark, that is, to be done on each ... that uses a certain oconvcode I don't recall right now to accept hex ... This is all a bit tedious, but I really hate coordinating third party software, ...
    (comp.databases.pick)