comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: Why does this input get "skipped"?
Date: Sat, 20 Aug 2016 21:07:27 -0700
Date: 2016-08-20T21:07:27-07:00	[thread overview]
Message-ID: <npb9dv$ffi$1@dont-email.me> (raw)
In-Reply-To: <a86bf07a-d23f-4f13-9dde-cc512c419bde@googlegroups.com>

On 08/20/2016 06:04 PM, John Smith wrote:
> 
> Just to be sure, Speed_IO.Get, you meant Ada.Integer_Text_IO.Get, yes?
> 
> I've made mistakes like this, but I want to be sure that I'm on the right page as well.

Because it's a good idea to use types that reflect the problem, maybe something like

type Speed_Value is range 30 .. 150; -- Speeds the system can maintain, in kph

package Speed_IO is new Ada.Text_IO.Integer_IO (Num => Speed_Value);

-- 
Jeff Carter
"People called Romanes, they go the house?"
Monty Python's Life of Brian
79


  reply	other threads:[~2016-08-21  4:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-20 22:41 Why does this input get "skipped"? John Smith
2016-08-20 23:16 ` Jeffrey R. Carter
2016-08-21  0:01   ` John Smith
2016-08-21  0:36     ` John Smith
2016-08-22  5:00       ` J-P. Rosen
2016-08-22 22:18       ` rieachus
2016-08-23  6:22         ` J-P. Rosen
2016-08-24 10:34           ` rieachus
2016-08-21  0:50     ` Jeffrey R. Carter
2016-08-21  1:04       ` John Smith
2016-08-21  4:07         ` Jeffrey R. Carter [this message]
2016-08-21  0:00 ` rieachus
replies disabled

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