🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #3039

Re: binary IO in M2

#3039
From: "David Collier"
Date: Fri, 17 Nov 1995 09:31
21 lines
882 bytes
Binary IO in M2...

How about something like ( JPI anyway ):

TYPE RealBinaryType = ARRAY [ 0 .. SIZE(REAL) - 1 ] OF BYTE ;

VAR F : REAL ;

PROCEDURE WriteRealInBinary(  ..... RealNumber : REAL ) ;
BEGIN
FIO.WrBin(File , RealBinaryType( RealNumber ) , Size( RealBinaryType )) ;
END WriteRealInBinary ;
________

Sorry, lots of details missing, it's late. But the tools are all very 
simple.

Of course it is easier if you can write/read complete records, with all 
the fields set up. It becomes one call to FIO for lots of variables.

D.
Technical Details
Message-ID: <DI6L4D.F0@cix.compulink.co.uk>
Path: arc1-ca.pugleaf.net!cix.compulink.co.uk!usenet
References: <DI4zvy.19A@liverpool.ac.uk>

Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.modula2
Path: arc1-ca.pugleaf.net!cix.compulink.co.uk!usenet
From: dcollier@cix.compulink.co.uk ("David Collier")
Subject: Re: binary IO in M2
Message-ID: <DI6L4D.F0@cix.compulink.co.uk>
Organization: DexDyne
References: <DI4zvy.19A@liverpool.ac.uk>
Date: Fri, 17 Nov 1995 09:31:24 GMT
X-News-Software: Ameol