🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #4945

Re: Re2: Clever way to deal with this?

#4945
From: Stephen Wilson Bailey
Date: Wed, 14 Feb 1990 23:04
20 lines
998 bytes
Right, you just ditch the ancillary pointer arithmetic entirely,
using the array.

I don't think you can avoid a pointer entirely, though.  Specifically,

type BufType  = RECORD
   length: CARDINAL;
   text: ARRAY CARDINAL OF CHAR;
  END;

But then:

VAR
  buf: BufType;

This will try to create a huge, static data object.  What you must do instead
is cast a smaller (ALLOCATEd) data object as an object of type BufType, and
the only way to do this is with a pointer, per my original message.

Steph
Technical Details
Message-ID: <9002142304.AA09161@candide>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!GARGOYLE.UCHICAGO.EDU!bailey%candide

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!GARGOYLE.UCHICAGO.EDU!bailey%candide
From: bailey%candide@GARGOYLE.UCHICAGO.EDU (Stephen Wilson Bailey)
Newsgroups: comp.lang.modula2
Subject: Re: Re2: Clever way to deal with this?
Message-ID: <9002142304.AA09161@candide>
Date: 14 Feb 90 23:04:37 GMT
Sender: daemon@ucbvax.BERKELEY.EDU
Reply-To: Modula2 List <INFO-M2%UCF1VM.BITNET@PSUVM.PSU.EDU>
Organization: The Internet
Lines: 20