comp.lang.ada
 help / color / mirror / Atom feed
From: Dale Stanbrough <dale@goanna.cs.rmit.EDU.AU>
Subject: Re: Reply Quickly!
Date: 1997/05/26
Date: 1997-05-26T00:00:00+00:00	[thread overview]
Message-ID: <5md3ap$it5$1@goanna.cs.rmit.edu.au> (raw)
In-Reply-To: 3387E381.2389@opera.iinet.net.au


oliver white writes:

"SUBTYPE Yeartype IS Integer RANGE 1900..2100;
 TYPE Choice_Type IS (Register, Display, Help, Quit);
 
 PACKAGE Menu_Io IS NEW Text_Io.Enumeration_Io(Enum => Choice_Type);
 PACKAGE Boolean_Io IS NEW Text_Io.Enumeration_Io(Enum => Boolean);
 PACKAGE Int_Io IS NEW Text_Io.Integer_Io(Integer);
 PACKAGE Flo_Io IS NEW Text_Io.Float_Io(Float);"


I wonder whose textbook Oliver uses! :-)

Just a couple of notes...

 PACKAGE Int_Io IS NEW Text_Io.Integer_Io(Integer);
 PACKAGE Flo_Io IS NEW Text_Io.Float_Io(Float);"

can be replaced by 

	with Ada.Text_IO;
	with Ada.Float_Text_IO;

in the context clause.

Also I don't teach the use of enumeration IO for interaction with the
user. I would _never_ write a program like that, and would not expect
my students to either.


Dale




      reply	other threads:[~1997-05-26  0:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-05-25  0:00 Reply Quickly! oliver white
1997-05-26  0:00 ` Dale Stanbrough [this message]
replies disabled

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