by Olaf Wagner <wagner@[EMAIL PROTECTED]
>
Jan 19, 2004 at 11:18 PM
Henning Thielemann <iakd0@[EMAIL PROTECTED]
> wrote:
> On Sat, 17 Jan 2004, Olaf Wagner wrote:
>> Henning Thielemann <iakd0@[EMAIL PROTECTED]
> wrote:
>>
>> > Is there a module which allows for safe access to binary files, like
audio
>> > or graphic files? I think it should sup****t such routines like
>>
>> > PutInt (wr: File.T; val: INTEGER; byteOrder: Endian; size:
CARDINAL; );
>> > PutReal (wr: File.T; real: REAL; byteOrder: Endian; );
>> > PutChar (wr: File.T; char: CHAR; );
>>
>> > and so on.
>>
>> What exactly do you mean by `safe'?
> Using libm3/src/os/Common/File.i3 you need LOOPHOLE to convert several
> datatypes into an ARRAY OF Byte, which is an unsafe operation. When
using
> LOOPHOLE to convert an INTEGER into an ARRAY OF Byte the programs become
> machine dependent because of the byte order. Alternatively one could
> convert numbers and texts into ARRAYs OF Byte manually which is
> cumbersome.
> I just like to demonstrate students how to create binary files like
audio
> streams with Modula 3.
What about the binary I/O package from m3.org, which was im****ted as
cm3/m3-libs/binIO into cm3 some time ago?
Olaf
--
/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
|| Olaf Wagner | wagner(at)luthien.in-berlin.de (priv.)|
|| Cranachstrasse 7 | wagner(at)elego.de (business) |
|| D-12157 Berlin | phone: +49 30 85 60 26 70 |
|| Germany / Deutschland | fax: +49 30 85 58 01 88 |
\/////////////////////////////////////////////////////////////////