home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.modula2
- Path: sparky!uunet!munnari.oz.au!sol.deakin.OZ.AU!news.cs.uow.edu.au!seagoon.newcastle.edu.au!wombat.newcastle.edu.au!eepjm
- From: eepjm@wombat.newcastle.edu.au (Peter Moylan)
- Subject: Re: Generic stack implementation
- Message-ID: <1992Dec14.133750.1@wombat.newcastle.edu.au>
- Lines: 27
- Sender: news@seagoon.newcastle.edu.au
- Organization: University of Newcastle, AUSTRALIA
- References: <9212091316.AA14856@elg> <911288c.32.724187845@ace.acadiau.ca>
- Date: Mon, 14 Dec 1992 02:37:50 GMT
-
- In article <911288c.32.724187845@ace.acadiau.ca>, 911288c@ace.acadiau.ca (HON (EDWIN) KIN CHUNG) writes:
-
- >>VAR
- >> [...]
- >> location: ADDRESS;
- >>BEGIN
- >> [...]
- >> INC(location, TSIZE(WORD));
- > ^^^^^^
- > parameter not correct type ??
- >
- > Is this some problem ...???
- > I am using TopSpeed Modular-2.
-
- TopSpeed Modula-2 won't let you do arithmetic on addresses. And a
- good thing, too, in my opinion. Address arithmetic is one of the
- most non-portable things you can do, and I'm a little shocked to
- see an example of it in a textbook.
-
- There's a procedure in one of the TopSpeed libraries called AddAddr
- or something similar (sorry I can't be more explicit, my TopSpeed
- manuals are at home) which will be an adequate substitute for the
- INC in this example. A better solution, though, would be to
- redesign the algorithm so that it didn't need to do address arithmetic.
-
- --
- Peter Moylan eepjm@wombat.newcastle.edu.au
-