🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.oberon
Article #1264

Re: Is "POINTER TO ARRAY OF Object" legal?

#1264
From: Alex Nedorya
Date: Tue, 02 Apr 1996 18:57
28 lines
1596 bytes
skulski@fermi.nsrl.rochester.edu wrote:
> 
> Is the following legal Oberon-2;
> 
>         Object* = POINTER TO ObjectDesc;
>         ObjectDesc* = RECORD END;
> 
>         Array* = POINTER TO ARRAY OF Object;
> 
> It compiles OK under Linux V4-0.9. However, I was told of at least
> one compiler Oberon-2 which does not compile this. Is the above
> construct legal, or is the said compiler broken?
> 
> Pls note, that for example Kepler uses the following to represent
> objects:                StarTab = POINTER TO ARRAY OF LONGINT;
> with calls to SYSTEM.VAL to convert POINTERS to  LONGINTs.
> 
> So, there is a potential problem here which Josef wanted to avoid.
>
> Is the "POINTER TO ARRAY OF Object" good legal Oberon, or is it not?

It is a good legal Oberon, no doubt.
What can be wrong with POINTER TO ARRAY OF POINTER?

I've checked (under XDS) POINTER TO ARRAY OF ObjectDesc, because SIZE(ObjectDesc) is zero and it can 
cause a problem (array which element is of zero size), but both cases work OK.

-- Alex
Technical Details
Message-ID: <3183BF9F.13D9@iis.nsk.su>
Path: arc1-ca.pugleaf.net!news1.relcom.eu.net!tsiren!usenet
References: <1996Apr1.191755.1@fermi.nsrl.rochester.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.oberon
Path: arc1-ca.pugleaf.net!news1.relcom.eu.net!tsiren!usenet
From: Alex Nedorya <ned@iis.nsk.su>
Subject: Re: Is "POINTER TO ARRAY OF Object" legal?
Content-Type: text/plain; charset=us-ascii
Sender: usenet@itfs.nsk.su (Deputy News Master)
Content-Transfer-Encoding: 7bit
Organization: IIS
Message-ID: <3183BF9F.13D9@iis.nsk.su>
References: <1996Apr1.191755.1@fermi.nsrl.rochester.edu>
X-Mailer: Mozilla 2.01Gold (Win95; I)
Mime-Version: 1.0
Cc: ned
X-Nntp-Posting-Host: 194.226.177.97
Date: Tue, 2 Apr 1996 18:57:35 GMT