From: Stefan Soos <stefan.soos@gmx.de>
Subject: Different initial values for derived type?
Date: Sun, 9 Nov 2003 15:10:06 +0100
Date: 2003-11-09T15:10:06+01:00 [thread overview]
Message-ID: <urhlob.092.ln@ID-soos.user.dfncis.de> (raw)
Hello,
I've got the following type definition
type Object_Type is tagged
record
Name : Character := '?';
Score : Natural := 0;
X : Positive := 1;
Y : Positive := 1;
end record;
Now I'd like to have a derived type with the same components
but with different initial Values. Do I have to use discriminants for
all of my components or can I say something like
type Derived_Type is new Object_Type with ( Name => '!',
Score => 10);
I know, I can't because it doesn't compile, but is there a
similar approach?
Thanks in advance,
Stefan
--
next reply other threads:[~2003-11-09 14:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-09 14:10 Stefan Soos [this message]
2003-11-10 12:56 ` Different initial values for derived type? Mark Doherty
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox