comp.lang.ada
 help / color / mirror / Atom feed
From: "Nick Roberts" <Nick.Roberts@dial.pipex.com>
Subject: Re: Stream_io / records with default discriminants
Date: 1999/02/17
Date: 1999-02-17T00:00:00+00:00	[thread overview]
Message-ID: <7afc1n$3mi$1@plug.news.pipex.net> (raw)
In-Reply-To: 7a873a$kon$1@nnrp1.dejanews.com

robert_dewar@my-dejanews.com wrote in message
<7a873a$kon$1@nnrp1.dejanews.com>...
|In article <7a7fbd$t50$1@plug.news.pipex.net>,
|  "Nick Roberts" <Nick.Roberts@dial.pipex.com> wrote:
|> Bernd,
|>
|> I think your problem is this: when you declare
|> Test_Record1, it is constrained but not initialised.
|
|This is completely wrong,

Robert (and Bernd in an e-mail) is absolutely right. Test_Record_1 is
initialised. My apologies.

|I am not sure why Nick is getting
|so confused over this. Of course it is initialized, why
|would you ever think it wasn't?

Eyesight's going ;-) I simply didn't see the ":= 1" initialisation.

Maybe it is an implementation problem. Bernd, you might like to try using

   with Ada.Exceptions; use Ada.Exceptions;

and then

            exception
                when Eof =>
                    Text_Io.Put_Line ("EoF!");
                    exit;
                when Error: Constraint_Error =>
                    Text_IO.Put_Line(Exception_Information(Error));
                    exit; -- maybe
            end;

in order to get some more information on what the compiler thinks is wrong.

Also, I have an RM95 question: where, in the RM, does it say that a
component_definition must be definite? (Or does it not have to be
definite?!)

Again, my apologies for any confusion.


-------------------------------------
Nick Roberts

'The time has come,' the Walrus said,
  'To talk of many things:
Of shoes--of ships--and sealing wax--
  Of cabbages--and kings--
And why the sea is boiling hot--
  And whether pigs have wings.'
                        Lewis Carroll
          "Through the Looking Glass"
-------------------------------------







  reply	other threads:[~1999-02-17  0:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-02-14  0:00 Stream_io / records with default discriminants Bernd Ragutt
1999-02-14  0:00 ` David C. Hoos, Sr.
1999-02-14  0:00 ` Matthew Heaney
1999-02-14  0:00   ` Bernd Ragutt
1999-02-14  0:00     ` Nick Roberts
1999-02-15  0:00       ` robert_dewar
1999-02-17  0:00         ` Nick Roberts [this message]
1999-02-18  0:00           ` dennison
1999-02-14  0:00     ` robert_dewar
replies disabled

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