🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #178

Re: Modula2 front end for gcc?

#178
From: Greg Granger
Date: Mon, 17 Jul 1989 18:03
25 lines
1604 bytes
IMHO the implementation of a variable number of parameters should be
as follows:

  -Introduce a new data type that is compatible will all other data
types and can only be used in a formal parameter list (similar to
ARRAY OF WORD).  Call this new type DESCRIPTOR.
  -Variables of type DESCRIPTOR will be records containing the
variable's type, location and size.  Variables of type RECORD and
ARRAY will require additional type information.  Fields for element
width and type can be added for ARRAYs. RECORD types can be
implemented as a linked list of DESCRIPTOR.

In this way the parameter ARRAY OF DESCRIPTOR would allow you to pass
a variable number of paramenters, and still retain limited (user
enforced) type checking.

Possible problems:  References could be determined at compile time,
except of course for location values.  Parameters of type DESCRIPTOR
could not be passed to other procedures, because it would be difficult
(impossible?) to determine references at compile time.

Still it seems that this approach would allow greater flexiblity and
consistency with M2.

                                                      Greg
Technical Details
Message-ID: <INFO-M2%89071714450923@UCF1VM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!VTVM1.BITNET!GRANGERG

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!VTVM1.BITNET!GRANGERG
From: GRANGERG@VTVM1.BITNET (Greg Granger)
Newsgroups: comp.lang.modula2
Subject: Re: Modula2 front end for gcc?
Message-ID: <INFO-M2%89071714450923@UCF1VM>
Date: 17 Jul 89 18:03:28 GMT
Sender: daemon@ucbvax.BERKELEY.EDU
Reply-To: Modula2 List <INFO-M2%UCF1VM.bitnet@lilac.berkeley.edu>
Organization: The Internet
Lines: 25