Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Modula 3 > Re: SAFE access...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 4 Topic 81 of 148
Post > Topic >>

Re: SAFE access to binary files

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            | 
\/////////////////////////////////////////////////////////////////
 




 4 Posts in Topic:
SAFE access to binary files
Henning Thielemann <ia  2004-01-16 13:36:57 
Re: SAFE access to binary files
Olaf Wagner <wagner@[E  2004-01-17 11:48:10 
Re: SAFE access to binary files
Henning Thielemann <ia  2004-01-19 12:33:41 
Re: SAFE access to binary files
Olaf Wagner <wagner@[E  2004-01-19 23:18:20 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Jul 6 2:08:28 CDT 2008.