🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.atari.st
Article #26715

Re: Flame on TDI Modula-2

#26715
From: ZEIL
Date: Sat, 09 May 1987 01:41
38 lines
2811 bytes
> I have a set of procedure functions which return vector records (specifically
> state information data structures).  Well, I stick my definition module
> which contained the aforementioned procedure functions, through the compiler,
> and guess what I get?  A lovely little error 88 in those procedure functions.

Don't blame TDI - that's "standard" MODULA-2. In "Programming in Modula-2",
3rd edition, Wirth says "Only one value, however, can be returned as the
result of a function. This value, moreover, cannot be of a structured type."
The reasons for this have to do with the ease of implementation on a wide
variety of machines, but I agree that it's annoying. You either have to
use non-function procedures or else dynamically allocate the structured
value and return a pointer to it.


> The other thing is sets. Why does Modula-2, limit me to only 128 elements in
> a large set? What if I was creating some routines which required set
> elements greater than that number (for example the ASCII character set)?

My copy of the TDI manual indicates that the limit is 128 BYTES, not 128
elements, so you should be able to have sets of up to 8*128 elements. I
haven't tried this with version 2.0, but it works fine with version 3.0.

BTW, I've found upgrading to version 3.0 well worth the $60 charge. The
compiler is noticably faster and the code generated is much smaller.
The limitation on passing dynamic arrays as value parameters has been
lifted. There is a bug in the linker, as some folks have pointed out here
previously. Unlike the folks who complained about it earlier, I've been able
to compile all of the demos supplied with the commercial version without
incident. The bug appears to be related to the linker's running out of
storage. The one time it manifested itself, I was able to get rid of it by
dropping some extraneous IMPORTs left over from earlier debugging. I found
that I could also get rid of it by shrinking my ramdisk instead. (I run a
512k ETERNAL2 ramdisk on my 1040, which is enough to hold all of the
SYM and LNK libraries, the editor, linker, compiler, and m2desk, and still
has enough room for the temporary files generated by the compiler.)


                                                    Steve Z
Technical Details
Message-ID: <8705090601.AA00482@ucbvax.Berkeley.EDU>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rutgers!ames!ucbcad!ucbvax!cs.umass.EDU!ZEIL

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rutgers!ames!ucbcad!ucbvax!cs.umass.EDU!ZEIL
From: ZEIL@cs.umass.EDU
Newsgroups: comp.sys.atari.st
Subject: Re: Flame on TDI Modula-2
Message-ID: <8705090601.AA00482@ucbvax.Berkeley.EDU>
Date: Fri, 8-May-87 21:41:00 EDT
Article-I.D.: ucbvax.8705090601.AA00482
Posted: Fri May  8 21:41:00 1987
Date-Received: Sun, 10-May-87 01:30:52 EDT
Sender: daemon@ucbvax.BERKELEY.EDU
Distribution: world
Organization: The ARPA Internet
Lines: 38