comp.lang.ada
 help / color / mirror / Atom feed
* Re: Get Integer into Enumeration_IO doesn't work
@ 2002-11-18  6:38 Grein, Christoph
  2002-11-18 14:28 ` Peter Richtmyer
  0 siblings, 1 reply; 5+ messages in thread
From: Grein, Christoph @ 2002-11-18  6:38 UTC (permalink / 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.



^ permalink raw reply	[flat|nested] 5+ messages in thread
* Get Integer into Enumeration_IO doesn't work
@ 2002-11-16 10:17 Amir Shaked
  2002-11-16 11:13 ` David C. Hoos, Sr.
  2002-11-17  8:38 ` Dr. Michael Paus
  0 siblings, 2 replies; 5+ messages in thread
From: Amir Shaked @ 2002-11-16 10:17 UTC (permalink / raw)


Hello,

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;



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-11-18 14:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-18  6:38 Get Integer into Enumeration_IO doesn't work Grein, Christoph
2002-11-18 14:28 ` 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

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