* Re: equivalent to ATOI in ADA
2002-01-04 16:46 equivalent to ATOI in ADA wurm
@ 2002-01-04 16:09 ` Alfred Hilscher
2002-01-04 16:12 ` Ted Dennison
` (4 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Alfred Hilscher @ 2002-01-04 16:09 UTC (permalink / raw)
Look at the attributes 'Value and 'Image.
wurm wrote:
>
> Hi all,
>
> Id like to know if there is an equivalent to ATOI already built into ADA
> somewhere, I realize that i could simply import it from C but id prefer not
> to do that if i dont have to
>
> Thanx!
>
> Phil
Phil the "wurm" ?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: equivalent to ATOI in ADA
2002-01-04 16:46 equivalent to ATOI in ADA wurm
2002-01-04 16:09 ` Alfred Hilscher
@ 2002-01-04 16:12 ` Ted Dennison
2002-01-04 17:15 ` wurm
2002-01-04 16:16 ` Michal Nowak
` (3 subsequent siblings)
5 siblings, 1 reply; 9+ messages in thread
From: Ted Dennison @ 2002-01-04 16:12 UTC (permalink / raw)
In article <a14iun$25i$1@dns3.cae.ca>, wurm says...
>Id like to know if there is an equivalent to ATOI already built into ADA
>somewhere, I realize that i could simply import it from C but id prefer not
>to do that if i dont have to
Integer'Value
I highly suggest you look through Appendex K of the LRM
(http://www.ada-auth.org/~acats/arm-html/RM-K.html). There are lots of goodies
in there. While you are at it, have a look through Annex A too.
---
T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html
No trees were killed in the sending of this message.
However a large number of electrons were terribly inconvenienced.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: equivalent to ATOI in ADA
2002-01-04 16:46 equivalent to ATOI in ADA wurm
2002-01-04 16:09 ` Alfred Hilscher
2002-01-04 16:12 ` Ted Dennison
@ 2002-01-04 16:16 ` Michal Nowak
2002-01-04 17:49 ` David C. Hoos
` (2 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Michal Nowak @ 2002-01-04 16:16 UTC (permalink / raw)
To: comp.lang.ada usegroup->mailing list gateway
On 02-01-04 at 10:46 wurm wrote:
>Hi all,
>
>Id like to know if there is an equivalent to ATOI already built into ADA
>somewhere, I realize that i could simply import it from C but id prefer not
>to do that if i dont have to
>
>Thanx!
>
>Phil
A : Integer;
A := Integer'Value("Integer_Number");
Mike
-----------------------------------------
____|
\%/ |~~\
O |
o>> Mike Nowak |
T |
/ > vinnie@inetia.pl |
http://www.geocities.com/vinnie14pl _|__
^ permalink raw reply [flat|nested] 9+ messages in thread
* equivalent to ATOI in ADA
@ 2002-01-04 16:46 wurm
2002-01-04 16:09 ` Alfred Hilscher
` (5 more replies)
0 siblings, 6 replies; 9+ messages in thread
From: wurm @ 2002-01-04 16:46 UTC (permalink / raw)
Hi all,
Id like to know if there is an equivalent to ATOI already built into ADA
somewhere, I realize that i could simply import it from C but id prefer not
to do that if i dont have to
Thanx!
Phil
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: equivalent to ATOI in ADA
2002-01-04 16:12 ` Ted Dennison
@ 2002-01-04 17:15 ` wurm
0 siblings, 0 replies; 9+ messages in thread
From: wurm @ 2002-01-04 17:15 UTC (permalink / raw)
Thanx for the reply, i had looked through there but must of missed it
funny thing was, i decided to not be lazy and wrote my own 3 line algorithm
to do the conversion, and finished it as soon as i saw your message :)
Phil
"Ted Dennison" <dennison@telepath.com> wrote in message
news:FvkZ7.3920$cD4.6603@www.newsranger.com...
> In article <a14iun$25i$1@dns3.cae.ca>, wurm says...
> >Id like to know if there is an equivalent to ATOI already built into ADA
> >somewhere, I realize that i could simply import it from C but id prefer
not
> >to do that if i dont have to
>
> Integer'Value
>
> I highly suggest you look through Appendex K of the LRM
> (http://www.ada-auth.org/~acats/arm-html/RM-K.html). There are lots of
goodies
> in there. While you are at it, have a look through Annex A too.
>
> ---
> T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html
>
> No trees were killed in the sending of this message.
> However a large number of electrons were terribly inconvenienced.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: equivalent to ATOI in ADA
2002-01-04 16:46 equivalent to ATOI in ADA wurm
` (2 preceding siblings ...)
2002-01-04 16:16 ` Michal Nowak
@ 2002-01-04 17:49 ` David C. Hoos
2002-01-04 20:25 ` Stephen Leake
2002-01-04 20:36 ` Adrian Knoth
5 siblings, 0 replies; 9+ messages in thread
From: David C. Hoos @ 2002-01-04 17:49 UTC (permalink / raw)
To: comp.lang.ada
You would use the Integer'Value attribute function.
----- Original Message -----
From: "wurm" <a@b.c>
Newsgroups: comp.lang.ada
To: <comp.lang.ada@ada.eu.org>
Sent: Friday, January 04, 2002 10:46 AM
Subject: equivalent to ATOI in ADA
> Hi all,
>
> Id like to know if there is an equivalent to ATOI already built into ADA
> somewhere, I realize that i could simply import it from C but id prefer
not
> to do that if i dont have to
>
> Thanx!
>
> Phil
>
>
> _______________________________________________
> comp.lang.ada mailing list
> comp.lang.ada@ada.eu.org
> http://ada.eu.org/mailman/listinfo/comp.lang.ada
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: equivalent to ATOI in ADA
2002-01-04 16:46 equivalent to ATOI in ADA wurm
` (3 preceding siblings ...)
2002-01-04 17:49 ` David C. Hoos
@ 2002-01-04 20:25 ` Stephen Leake
2002-01-04 21:17 ` Larry Kilgallen
2002-01-04 20:36 ` Adrian Knoth
5 siblings, 1 reply; 9+ messages in thread
From: Stephen Leake @ 2002-01-04 20:25 UTC (permalink / raw)
"wurm" <a@b.c> writes:
> Hi all,
>
> Id like to know if there is an equivalent to ATOI already built into ADA
> somewhere, I realize that i could simply import it from C but id prefer not
> to do that if i dont have to
Just to be pedantic, there is no function, in any standard language
library I know of, named "ATOI". There is one in ANSI C named "atoi".
Since C is case-sensitive, that's clearly a different function :).
Hey, it's 2002. Let's start the year off right!
--
-- Stephe
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: equivalent to ATOI in ADA
2002-01-04 16:46 equivalent to ATOI in ADA wurm
` (4 preceding siblings ...)
2002-01-04 20:25 ` Stephen Leake
@ 2002-01-04 20:36 ` Adrian Knoth
5 siblings, 0 replies; 9+ messages in thread
From: Adrian Knoth @ 2002-01-04 20:36 UTC (permalink / raw)
wurm <a@b.c> wrote:
> Hi all,
Hi!
> Id like to know if there is an equivalent to ATOI already built into ADA
> somewhere,
I'm not sure whether Integer'Value(string_variable) will fit your needs.
--
mail: adi@thur.de http://adi.thur.de PGP: v2-key via keyserver
Ich kann auch "42" zu jedem Artikel schreiben und die Antwort ist immer
richtig. Nur die Frage war halt falsch. (Ulli Horlacher in dcoum)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: equivalent to ATOI in ADA
2002-01-04 20:25 ` Stephen Leake
@ 2002-01-04 21:17 ` Larry Kilgallen
0 siblings, 0 replies; 9+ messages in thread
From: Larry Kilgallen @ 2002-01-04 21:17 UTC (permalink / raw)
In article <uofk97tj8.fsf@gsfc.nasa.gov>, Stephen Leake <stephen.a.leake.1@gsfc.nasa.gov> writes:
> Just to be pedantic, there is no function, in any standard language
> library I know of, named "ATOI". There is one in ANSI C named "atoi".
> Since C is case-sensitive, that's clearly a different function :).
>
> Hey, it's 2002. Let's start the year off right!
I am all in favor of doing things right, but it is too much work to get
all those C programmers to change their language to case-neutral.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2002-01-04 21:17 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-04 16:46 equivalent to ATOI in ADA wurm
2002-01-04 16:09 ` Alfred Hilscher
2002-01-04 16:12 ` Ted Dennison
2002-01-04 17:15 ` wurm
2002-01-04 16:16 ` Michal Nowak
2002-01-04 17:49 ` David C. Hoos
2002-01-04 20:25 ` Stephen Leake
2002-01-04 21:17 ` Larry Kilgallen
2002-01-04 20:36 ` Adrian Knoth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox