|
|||
|
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 |
|
|
||||
|
||||
|
|
|
|||
|
"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 |
|
|||
|
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 |
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|