comp.lang.ada
 help / color / mirror / Atom feed
* program to separate the real and imaginary
@ 2000-11-08  1:21 jordan
  2000-11-08  2:24 ` Jeff Carter
  0 siblings, 1 reply; 2+ messages in thread
From: jordan @ 2000-11-08  1:21 UTC (permalink / raw)


Dear all,
In Ada, if i want to input a complex number from the terminal like:
2+3i, 4-6i, -4-6i, 5i, 9
i want the program to separate the real part and the imaginary part, how
can i do???

does Ada have type conversion from string(character array) to Integer,
or something like?????

since i want to prgroam this task by store the input from the terminal
in a string(character array).......





^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: program to separate the real and imaginary
  2000-11-08  1:21 program to separate the real and imaginary jordan
@ 2000-11-08  2:24 ` Jeff Carter
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Carter @ 2000-11-08  2:24 UTC (permalink / raw)


jordan wrote:
> does Ada have type conversion from string(character array) to Integer,
> or something like?????

Certainly. Take a look at the 'Value attribute, as well as package
Ada.Text_IO (ARM A.10). For dealing with complex numbers, you might want
to take a look at ARM Annex G as well.

If you don't have a copy of the Ada Reference Manual, you can find one
on-line at

http://www.adapower.com/rm95/index.html

-- 
Jeff Carter
"I blow my nose on you."
Monty Python & the Holy Grail



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-11-08  2:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-08  1:21 program to separate the real and imaginary jordan
2000-11-08  2:24 ` Jeff Carter

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