comp.lang.ada
 help / color / mirror / Atom feed
From: "Marin David Condic" <marin.condic.auntie.spam@pacemicro.com>
Subject: Re: Ada'83 to Ada'95 Problem
Date: Thu, 1 Mar 2001 09:19:55 -0500
Date: 2001-03-01T14:20:41+00:00	[thread overview]
Message-ID: <97llrp$4mn$1@nh.pace.co.uk> (raw)
In-Reply-To: 3A9E35F3.EE64F602@port.ac.uk

Yes, this is a difference between Ada83 & Ada95. People complained that
Text_IO was too unforgiving when reading numeric values. One possible
solution is to read in the line as a string and scan the string for correct
input before reading the Integer from the string.

In real world software that requires keyboard input, you almost invariably
go to some form of parsing your own input characters because inevitably,
language-supplied features never do all the things you want them to do...

MDC


"dis00109" <dis00109@port.ac.uk> wrote in message
news:3A9E35F3.EE64F602@port.ac.uk...
> I am trying to get a program to accept two integers as input by the user
> (for a university project) however in the exception handling section of
> my program it will not accept a float input as an error it merely
> ignores everything after the decimal point. This would appear to be a
> new feature in Ada'95, can anyone think of a way to solve this...PLEASE!
>
--
Marin David Condic
Senior Software Engineer
Pace Micro Technology Americas    www.pacemicro.com
Enabling the digital revolution
e-Mail:    marin.condic@pacemicro.com
Web:      http://www.mcondic.com/






  reply	other threads:[~2001-03-01 14:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-01 11:43 Ada'83 to Ada'95 Problem dis00109
2001-03-01 14:19 ` Marin David Condic [this message]
2001-03-01 14:27 ` John English
2001-03-01 18:23 ` Ted Dennison
2001-03-01 19:29 ` Singlespeeder
2001-03-02 16:03 ` Tucker Taft
  -- strict thread matches above, loose matches on Subject: below --
2001-03-01 17:39 Beard, Frank
2001-03-05 13:51 ` John English
replies disabled

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