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 3 of 4 Topic 81 of 149
Post > Topic >>

Re: SAFE access to binary files

by Henning Thielemann <iakd0@[EMAIL PROTECTED] > Jan 19, 2004 at 12:33 PM

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
***bersome. 
 I just like to demonstrate students how to create binary files like audio
streams with Modula 3.
 




 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 Fri Jul 25 0:24:45 CDT 2008.