comp.lang.ada
 help / color / mirror / Atom feed
* Help with access types
@ 2000-04-22  0:00 James Kerr
  2000-04-22  0:00 ` Robert Dewar
  0 siblings, 1 reply; 4+ messages in thread
From: James Kerr @ 2000-04-22  0:00 UTC (permalink / raw)


Okay basically I have a Specification that has this in the private section

private

    type Node(Length: Integer);
    type Tree is access node;
    type Tree_Array is array (Integer range <>) of Tree;
    type Node(Length: Integer) is
        record
            Marker: Boolean;
            Symbols: Symbol_Array(1..Length);
            Subtrees: Tree_Array(1..Length);
        end record;

Okay what is the easiest way to access these record variables, (IE Marker,
Symbols, Length) from a program that is using this specification.

Basically in the body I have an Add procedure which adds nodes to the tree,
i want to be able to check the record variables from a test program I have
written,

any ideas

mail me at

jkerr@southwest.com.au

cheers

James






^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Help with access types
  2000-04-22  0:00 Help with access types James Kerr
@ 2000-04-22  0:00 ` Robert Dewar
  2000-04-22  0:00   ` Ken Garlington
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Dewar @ 2000-04-22  0:00 UTC (permalink / raw)


In article <956388888.780287@karri.southwest.com.au>,
  "James Kerr" <jkerr@southwest.com.au> wrote:
> Okay basically I have a Specification that has this in the
private section
>
> private
>
>     type Node(Length: Integer);
>     type Tree is access node;
>     type Tree_Array is array (Integer range <>) of Tree;
>     type Node(Length: Integer) is
>         record
>             Marker: Boolean;
>             Symbols: Symbol_Array(1..Length);
>             Subtrees: Tree_Array(1..Length);
>         end record;
>
> Okay what is the easiest way to access these record variables,
(IE Marker,
> Symbols, Length) from a program that is using this
specification.

Can you give a bit more of an idea of why there is an issue
here? There seems to be nothing special about these types that
would preclude using normal record and array component notation.


Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Help with access types
  2000-04-22  0:00 ` Robert Dewar
@ 2000-04-22  0:00   ` Ken Garlington
  2000-04-23  0:00     ` James Kerr
  0 siblings, 1 reply; 4+ messages in thread
From: Ken Garlington @ 2000-04-22  0:00 UTC (permalink / raw)


Well, other than that they're in the private part of the specification,
which limits (intentionally)
which parts of the program can access these variables.

Does the statement "program that is using this specification" mean something
other than the body of the
package (or a private child of this package)?

"Robert Dewar" <robert_dewar@my-deja.com> wrote in message
news:8dsbq7$26i$1@nnrp1.deja.com...
> In article <956388888.780287@karri.southwest.com.au>,
>   "James Kerr" <jkerr@southwest.com.au> wrote:
> > Okay basically I have a Specification that has this in the
> private section
> >
> > private
> >
> >     type Node(Length: Integer);
> >     type Tree is access node;
> >     type Tree_Array is array (Integer range <>) of Tree;
> >     type Node(Length: Integer) is
> >         record
> >             Marker: Boolean;
> >             Symbols: Symbol_Array(1..Length);
> >             Subtrees: Tree_Array(1..Length);
> >         end record;
> >
> > Okay what is the easiest way to access these record variables,
> (IE Marker,
> > Symbols, Length) from a program that is using this
> specification.
>
> Can you give a bit more of an idea of why there is an issue
> here? There seems to be nothing special about these types that
> would preclude using normal record and array component notation.
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.






^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Help with access types
  2000-04-22  0:00   ` Ken Garlington
@ 2000-04-23  0:00     ` James Kerr
  0 siblings, 0 replies; 4+ messages in thread
From: James Kerr @ 2000-04-23  0:00 UTC (permalink / raw)


I solved the problem myself, thanks for the comments though

cheers
James
Ken Garlington <Ken.Garlington@computer.org> wrote in message
news:1gqM4.595$X55.75857@news.flash.net...
> Well, other than that they're in the private part of the specification,
> which limits (intentionally)
> which parts of the program can access these variables.
>
> Does the statement "program that is using this specification" mean
something
> other than the body of the
> package (or a private child of this package)?
>
> "Robert Dewar" <robert_dewar@my-deja.com> wrote in message
> news:8dsbq7$26i$1@nnrp1.deja.com...
> > In article <956388888.780287@karri.southwest.com.au>,
> >   "James Kerr" <jkerr@southwest.com.au> wrote:
> > > Okay basically I have a Specification that has this in the
> > private section
> > >
> > > private
> > >
> > >     type Node(Length: Integer);
> > >     type Tree is access node;
> > >     type Tree_Array is array (Integer range <>) of Tree;
> > >     type Node(Length: Integer) is
> > >         record
> > >             Marker: Boolean;
> > >             Symbols: Symbol_Array(1..Length);
> > >             Subtrees: Tree_Array(1..Length);
> > >         end record;
> > >
> > > Okay what is the easiest way to access these record variables,
> > (IE Marker,
> > > Symbols, Length) from a program that is using this
> > specification.
> >
> > Can you give a bit more of an idea of why there is an issue
> > here? There seems to be nothing special about these types that
> > would preclude using normal record and array component notation.
> >
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
>
>






^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2000-04-23  0:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-04-22  0:00 Help with access types James Kerr
2000-04-22  0:00 ` Robert Dewar
2000-04-22  0:00   ` Ken Garlington
2000-04-23  0:00     ` James Kerr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox