From: "Stephen Cole" <s_k_cole@yahoo.com>
Subject: Re: Simple Question 3
Date: Fri, 12 Oct 2001 12:33:34 +0100
Date: 2001-10-12T12:33:34+01:00 [thread overview]
Message-ID: <9q6k2r$p8g$1@trog.dera.gov.uk> (raw)
In-Reply-To: pepx7.4767$gT6.3058598@news1.rdc1.sfba.home.com
I would have thought that the compiler should just through the assignment X
:= Unit() out, because it does not statically match. I do not see why the
compiler has the right to demand you write a Unit() function for the derived
type. Is there a deeper reason why it does?
<tmoran@acm.org> wrote in message
news:pepx7.4767$gT6.3058598@news1.rdc1.sfba.home.com...
> > function Unit return MyRcd;
> >
> > type MyNewRcd is new MyRcd with
> > record
> > c: Integer;
> > end record;
> >...
> >It wants me to define a version of Unit() for each derived type?! Why?
> X : MyNewRcd;
> begin
> X := Unit;
> question: what is the value of X.c?
next prev parent reply other threads:[~2001-10-12 11:33 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 [this message]
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
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