comp.lang.ada
 help / color / mirror / Atom feed
From: Preben Randhol <randhol+abuse@pvv.org>
Subject: Re: ATOI
Date: Sat, 12 Jul 2003 09:05:39 +0000 (UTC)
Date: 2003-07-12T09:05:39+00:00	[thread overview]
Message-ID: <slrnbgvjqr.kd.randhol+abuse@kiuk0152.chembio.ntnu.no> (raw)
In-Reply-To: belta6$ghe$1@e3k.asi.ansaldo.it

Riccardo Fulcoli wrote:
> HI!
> I'm having problems reguarding the input/output from files in text mode.
> Exactly I would like to read a field as a string of 50 characters(and for
> that i'm using the redirection of the input) and after that to convert it in
> a number (an integer).
> i.e. I'm looking for a function like the C "atoi".

Number : Integer := 0;
Read_String : String (1..50);

-- Reading in the string etc...

   Number := Integer'Value (Read_String);

If I understand your question correctly

-- 
Ada95 is good for you.
http://www.crystalcode.com/codemage/MainMenu/Coding/Ada/IntroducingAda.php



      parent reply	other threads:[~2003-07-12  9:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-11  8:39 ATOI Riccardo Fulcoli
2003-07-12  1:58 ` ATOI Robert I. Eachus
2003-07-14  1:49   ` ATOI Richard Riehle
2003-07-12  9:05 ` Preben Randhol [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