🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #1038

Generic Lists

#1038
From: Bri
Date: Sun, 05 Aug 1990 15:35
26 lines
1611 bytes
I don't seem to be following this problem with generic lists.
I have routines implementing generic stacks in 2 different
methods lying around here somewhere.
They were written in Logitech Modula-2 with no problems.
The first algorithm uses the ARRAY OF BYTE to allow an size field to be
passed onto the stack. Consistency of stack items could be inforced by
checking the HIGH() of the parameter to see if they are the same
memory size. This is no different the C, which could give a flip
(well, it'll give you warnings if you are man enough to have warnings turned
on) about what values and types you pass and assign.
The other method is to just pass an address, and put the address on the stack.
This is definately more generic, but a lot harder to control what type of
items are put on the stack.

I guess my main problem is, if you want routines to implement a generic
structure, why be concerned how they work -- just concern yourself with
how well do they work?
As a programmer, I'd be interested about the workings of routines, but
as long as they wor<{k correctly, no need to worry!




ROSS@UCF1VM.BITNET
ROSS@UCF1VM.CC.UCF.EDU
ROSS@UCFLAN.CC.UCF.EDU
Technical Details
Message-ID: <INFO-M2%90080511542415@UCF1VM.BITNET>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!mips!decwrl!ucbvax!UCF1VM.BITNET!ROSS

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!mips!decwrl!ucbvax!UCF1VM.BITNET!ROSS
From: ROSS@UCF1VM.BITNET (Bri)
Newsgroups: comp.lang.modula2
Subject: Generic Lists
Message-ID: <INFO-M2%90080511542415@UCF1VM.BITNET>
Date: 5 Aug 90 15:35:12 GMT
Sender: daemon@ucbvax.BERKELEY.EDU
Reply-To: Modula2 List <INFO-M2%UCF1VM.BITNET@ucf1vm.cc.ucf.edu>
Organization: The Internet
Lines: 26