Go Back   Rhinocerus > Newsgroup > Newsgroup comp.lang.* 2 > Newsgroup comp.lang.oberon

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 07-29-2011, 01:20 PM
nojb
Guest
 
Posts: n/a
Default oberon-07 module system

Hello,

Is this valid according to the Oberon-07 specification?

MODULE A;
TYPE T* = ARRAY 10 OF INTEGER;
END A.

MODULE B;
IMPORT A;
VAR X : INTEGER; Y : A.T;
BEGIN
X := Y[3]
END B.

That is, when a type (e.g. A.T) is exported, is it exported as
an 'abstract' type (one we don't know the structure of),
or is it exported as a 'concrete' type (one we do know the
structure of)?

Thanks,
N
Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

  #2 (permalink)  
Old 07-30-2011, 12:13 AM
Chris Burrows
Guest
 
Posts: n/a
Default Re: oberon-07 module system

"nojb" <n.oje.bar@gmail.com> wrote in message
news:4b52491e-9882-4620-b906-fa21ac88efdb@eb9g2000vbb.googlegroups.com...
>
> Is this valid according to the Oberon-07 specification?
>


Yes.

--
Chris Burrows
CFB Software
Astrobe v3.4: ARM Oberon-07 Development System
http://www.astrobe.com


Reply With Quote
  #3 (permalink)  
Old 07-30-2011, 10:17 AM
August Karlstrom
Guest
 
Posts: n/a
Default Re: oberon-07 module system

On 2011-07-29 15:20, nojb wrote:
> Hello,
>
> Is this valid according to the Oberon-07 specification?
>
> MODULE A;
> TYPE T* = ARRAY 10 OF INTEGER;
> END A.
>
> MODULE B;
> IMPORT A;
> VAR X : INTEGER; Y : A.T;
> BEGIN
> X := Y[3]
> END B.
>
> That is, when a type (e.g. A.T) is exported, is it exported as
> an 'abstract' type (one we don't know the structure of),
> or is it exported as a 'concrete' type (one we do know the
> structure of)?


It is an interesting question you pose here. The array type is exported
as a concrete type in the same sense as a record type with public fields
(in both cases the structure will be visible in the module definition).
To make T an abstract type is of course trivial:

T* = RECORD
items: ARRAY 10 OF INTEGER
END


/August

--
The competent programmer is fully aware of the limited size of his own
skull. He therefore approaches his task with full humility, and avoids
clever tricks like the plague. --Edsger Dijkstra
Reply With Quote
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT. The time now is 10:15 AM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.