comp.lang.ada
 help / color / mirror / Atom feed
From: "Grein, Christoph" <christoph.grein@eurocopter.com>
Subject: Re: Get Integer into Enumeration_IO doesn't work
Date: Mon, 18 Nov 2002 07:38:20 +0100 (MET)
Date: 2002-11-18T07:38:20+01:00	[thread overview]
Message-ID: <mailman.1037601904.17138.comp.lang.ada@ada.eu.org> (raw)

> The following code compiles and links
> but fails on DATA_ERROR in run-time.
> Can you tell me why?
> 
> with Text_IO;
> procedure PrintInt
> is
>    Num  : Integer;
>    package EnumIO is new Text_IO.Enumeration_IO(Integer);
> begin
>    Text_IO.Put_Line ("Enter Num:");
>    EnumIO.Get (Num);
> end PrintInt;

While Integer is a discrete type and therefore allowed as an actual parameter to 
Text_IO.Enumeration_IO, this package is meant to be instantiated with 
enumeration types only.



             reply	other threads:[~2002-11-18  6:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-18  6:38 Grein, Christoph [this message]
2002-11-18 14:28 ` Get Integer into Enumeration_IO doesn't work Peter Richtmyer
  -- strict thread matches above, loose matches on Subject: below --
2002-11-16 10:17 Amir Shaked
2002-11-16 11:13 ` David C. Hoos, Sr.
2002-11-17  8:38 ` Dr. Michael Paus
replies disabled

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