comp.lang.ada
 help / color / mirror / Atom feed
From: Matthew Heaney <matthew_heaney@acm.org>
Subject: Re: String to Integer conversion?
Date: 1998/07/31
Date: 1998-07-31T00:00:00+00:00	[thread overview]
Message-ID: <m37m0vvubh.fsf@mheaney.ni.net> (raw)
In-Reply-To: 6ndi5d$uj3@gcsin3.geccs.gecm.com

John McCabe <john@assen.demon.co.uk> writes:

> Integer_IO provides versions of the Get and Put routines where the first 
> parameter is a string, so you need to instantiate Integer_IO for your 
> Integer Type ( or use Ada.Integer_Text_IO for the pre-defined type 
> Integer) then call the Get operation e.g.

In Ada 95 you don't need to instantiate Integer_IO on type Integer.  An
instantiation of Integer_IO, called Ada.Integer_Text_IO, comes
predefined as part of the standard library.

Ditto for type Float; there's a predefined instantiation called
Float_Text_IO.

Q for language lawyers: why no predefined instantiation of Fixed_IO for
type Duration?

As an alternative solution to the problem of converting a string to an
integer, you can use the attribute Integer'Value.





       reply	other threads:[~1998-07-31  0:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <c1.2b8.2Lzh62$03A@zesi.ruhr.de>
     [not found] ` <6ndi5d$uj3@gcsin3.geccs.gecm.com>
1998-07-31  0:00   ` Matthew Heaney [this message]
1998-07-30  0:00     ` String to Integer conversion? nabbasi
1998-08-01  0:00     ` Robert Dewar
1998-08-01  0:00       ` Matthew Heaney
1998-08-02  0:00         ` Robert Dewar
1998-08-02  0:00           ` Matthew Heaney
1998-08-04  0:00             ` Robert Dewar
1998-08-04  0:00               ` Matthew Heaney
1998-08-04  0:00                 ` David C. Hoos, Sr.
1998-07-31  0:00 ` Matthew Heaney
1998-07-31  0:00   ` daniel gaudry
replies disabled

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