scsh-users
[Top] [All Lists]

Chars and Bytes in the RM

To: <scsh@zurich.ai.mit.edu>
Subject: Chars and Bytes in the RM
From: RT Happe <rthappe@web.de>
Date: Tue, 31 Dec 2002 18:19:31 +0100 (CET)
Suppose we want to read the first bytes of a binary file and compare
these with given values, the magic number of a file format or whatever.
According to my literal and perhaps somewhat dumb (or blind) reading of
the Scsh and S48 manuals + the Scheme report, we have to make do with
read-string and char<->integer conversion.  However, the manuals don't
seem to say, whether or when we may identify characters (elements of
strings) with bytes (octets), and how char->integer represents characters
as integers (besides preserving order).  Char->ascii makes the
representation explicit, but I would nonetheless prefer the manual to be
more specific, and possibly scsh to provide i/o procedures for byte
vectors.

rthappe


<Prev in Thread] Current Thread [Next in Thread>
  • Chars and Bytes in the RM, RT Happe <=