From: Jeffrey Carter <jrcarter@acm.org>
Subject: Re: Simple Question 3
Date: Sun, 14 Oct 2001 21:00:29 GMT
Date: 2001-10-14T21:00:29+00:00 [thread overview]
Message-ID: <3BC9FD23.ACEB872A@acm.org> (raw)
In-Reply-To: 9qcmt9$8n1$1@newsg1.svr.pol.co.uk
Stephen Cole wrote:
>
> Look....people...my confusion is deeper than that. Its about this whole
> question of what a primitive operation is!
A primitive operation of a type is declared in the same package
specification as the type declaration, and has a parameter of the type
or returns a value of the type.
> Example
> Look at the following code....
>
> package MyTest is
>
> type MyTestType1 is tagged
> record
> a: Integer;
> b: Float;
> end record;
>
> function UnitA(a: MyTestType1) return Integer;
> function UnitB(a: MyTestType1) return MyTestType1;
> function UnitC return MyTestType1;
>
> type MyTestType2 is new MyTestType1 with
> record
> c: Integer;
> end record;
>
> end MyTest;
We could perhaps be of more assistance if you could define what you
expect the compiler to do for
X : Mytesttype2 := Unitc;
What is the value of X after initialization? Specifically, what is the
value of X.C?
--
Jeff Carter
"I fart in your general direction."
Monty Python & the Holy Grail
next prev parent reply other threads:[~2001-10-14 21:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-11 14:28 Simple Question 3 Stephen Cole
2001-10-11 22:41 ` tmoran
2001-10-12 11:33 ` Stephen Cole
2001-10-12 17:03 ` tmoran
2001-10-14 7:51 ` Jean-Marc Bourguet
2001-10-12 13:33 ` David C. Hoos
2001-10-14 18:53 ` Stephen Cole
2001-10-14 20:45 ` Vincent Marciante
2001-10-14 21:00 ` Jeffrey Carter [this message]
2001-10-14 22:08 ` Stephen Cole
2001-10-15 6:26 ` Jeffrey Carter
2001-10-14 21:15 ` Primitive operations and derived types (Was: Simple Question 3) Jacob Sparre Andersen
2001-10-14 21:42 ` Simple Question 3 tmoran
2001-10-14 22:30 ` Stephen Cole
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox