Article View: comp.lang.modula2
Article #2215Re^2: Generic stack implementation
From: Guenter Dotzel
Date: Thu, 17 Dec 1992 07:23
Date: Thu, 17 Dec 1992 07:23
35 lines
1544 bytes
1544 bytes
Message-Id: <11.23297@ame.nbg.sub.org>
OB%IFI.UIB.NO@USENET.ZER wrote on Tue, 12-15-1992 at 09:47 h
under the subject 'Re: Generic stack implementation':
> > item[wordcount] := location^;
> > INC(location, TSIZE(WORD));
> ^^^^^^
> parameter not correct type ??
>
> Is this some problem ...???
Yes, the problem is, that it's not allowed in ISO Modula-2.
> Can anybody help ??
As long as your favorite M2 compiler manufacturer doesn't implement
the ISO_M2 language changes, there is no help.
I don't know whether you got it, so here is my answer again:
location := SYSTEM.ADDADR(location, SIZE(location^))
Note, that SYSTEM.WORD is not ISO_M2, although an implementation is
allowed to extend ISO_M2's SYSTEM module.
> The type ADDRESS (from module SYSTEM) is compatible with pointers -
> it is a POINTER TO WORD.
^ POINTER TO SYSTEM.LOC in ISO_M2.
> The (first) argument to INC can a.o. be integer, cardinal, address,
^ ~ ISO_M2
> char, an enumeration type.
Guenter
Technical Details
Message-ID:
<t17jyOhz85@tron.gun.de>Path:
arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!yale.edu!ira.uka.de!smurf.sub.org!easix!tron.gun.de!g_dotzelShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!yale.edu!ira.uka.de!smurf.sub.org!easix!tron.gun.de!g_dotzel From: g_dotzel@tron.gun.de (Guenter Dotzel) Newsgroups: comp.lang.modula2 Subject: Re^2: Generic stack implementation Message-ID: <t17jyOhz85@tron.gun.de> Organization: TRON Public Mailbox, Neurath, Germany Date: Thu, 17 Dec 1992 08:23:00 +0100 Lines: 36