comp.lang.ada
 help / color / mirror / Atom feed
* No FAQ? A stupid question, then?
@ 1998-11-27  0:00 Ricardo Palomares Martínez
  1998-11-27  0:00 ` Matthew Heaney
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Ricardo Palomares Martínez @ 1998-11-27  0:00 UTC (permalink / raw)


    Greetings:

    Sorry if this is a FAQ, but I have been watching the news group for
more than a week and have not found the FAQ posted, nor references to it
in the subjects, and I'm in a bit of hurry.

    My problem is simple: I need to get the string expression of integer
and real numbers (the usual Str(number) of other languages), but I'm
unable (that wouldn't be surprising if you did know me :-) ) to get the
equivalent function looking around the Ada reference (the HTML files
which came with GNAT 3.07 for MS-DOS). So, I ask for an answer to any of
the following questions:


   * Is there any place where I can find a reference similar to the HLP
     files included in products like Delphi or Visual Basic (ie, where I
     can look for functions or procedures without having to know the
     packages hierarchy)?
   * Is there such a function like the ones I'm looking for in Ada95?

    Thanks a lot in advance. One more thing: while I will watch the news
group, my news server has been a bit inestable in the last weeks, so I
would appreciate a mail CC. I will post a summary of the answers in the
news group if anybody requests it to me. Thanks again.

--
Ricardo Palomares Martínez -------- mailto:ricardo@eucmax.sim.ucm.es
UCM - Servicio Informático Gestión -- http://www.ucm.es/info/gstwsig





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

* Re: No FAQ? A stupid question, then?
  1998-11-27  0:00 No FAQ? A stupid question, then? Ricardo Palomares Martínez
@ 1998-11-27  0:00 ` Matthew Heaney
  1998-11-27  0:00 ` Stuart Palin
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Matthew Heaney @ 1998-11-27  0:00 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 622 bytes --]

"Ricardo Palomares Mart�nez"  <ricardo@eucmax.sim.ucm.es> writes:

>     My problem is simple: I need to get the string expression of integer
> and real numbers (the usual Str(number) of other languages), but I'm
> unable (that wouldn't be surprising if you did know me :-) ) to get the
> equivalent function looking around the Ada reference (the HTML files
> which came with GNAT 3.07 for MS-DOS).

The attribute T'Image returns the string form of a number, ie

   S : String := Integer'Image (42);

You can go the other way, and get the value that corresponds to a
string:

   I : Integer := Integer'Value ("42");





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

* Re: No FAQ? A stupid question, then?
  1998-11-27  0:00 No FAQ? A stupid question, then? Ricardo Palomares Martínez
  1998-11-27  0:00 ` Matthew Heaney
@ 1998-11-27  0:00 ` Stuart Palin
  1998-11-27  0:00 ` David Botton
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Stuart Palin @ 1998-11-27  0:00 UTC (permalink / raw)


Ricardo Palomares Mart�nez wrote:

>  Sorry if this is a FAQ, but I have been watching the news group
>  for more than a week and have not found the FAQ posted, nor
>  references to it in the subjects, and I'm in a bit of hurry.

For your general Ada information you might try http://www.adahome.com/
which has quite a lot of information including FAQs

<snip specific problem - which has been answered by other respondenents>
--
Stuart Palin
Consultant Engineer
Avionic Systems Division (Rochester)
Marconi Electronic Systems Ltd




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

* Re: No FAQ? A stupid question, then?
  1998-11-27  0:00 No FAQ? A stupid question, then? Ricardo Palomares Martínez
  1998-11-27  0:00 ` Matthew Heaney
  1998-11-27  0:00 ` Stuart Palin
@ 1998-11-27  0:00 ` David Botton
  1998-11-30  0:00 ` Ricardo Palomares Martínez
  1998-12-01  0:00 ` Tom Moran
  4 siblings, 0 replies; 6+ messages in thread
From: David Botton @ 1998-11-27  0:00 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 807 bytes --]

Converting Strings to Integers and back
    http://www.botton.com/ada/lang/chartoint.html

There is a windows help version of the RM95 that that comes with Ada GIDE (a
free IDE for GNAT). You can find it on the PAL. You can also find an on-line
HTML version at www.adahome.com.

    See the links section at The Ada Source Code Treasury
        http://www.botton.com/ada

David Botton


Ricardo Palomares Mart�nez wrote in message
<365E787B.896BFA0C@eucmax.sim.ucm.es>...
    Greetings:

   * Is there any place where I can find a reference similar to the HLP
     files included in products like Delphi or Visual Basic (ie, where I
     can look for functions or procedures without having to know the
     packages hierarchy)?
   * Is there such a function like the ones I'm looking for in Ada95?








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

* Re: No FAQ? A stupid question, then?
  1998-11-27  0:00 No FAQ? A stupid question, then? Ricardo Palomares Martínez
                   ` (2 preceding siblings ...)
  1998-11-27  0:00 ` David Botton
@ 1998-11-30  0:00 ` Ricardo Palomares Martínez
  1998-12-01  0:00 ` Tom Moran
  4 siblings, 0 replies; 6+ messages in thread
From: Ricardo Palomares Martínez @ 1998-11-30  0:00 UTC (permalink / raw)


Ricardo Palomares Martínez wrote:

>     Greetings:
>
> (...)
>
>
>     My problem is simple: (...)

    In the end, my news servers seems to work well and I have seen the
answers from Mathew Heaney, Brian Orpin, Stuart Palin and David Botton.
Thanks a lot to all of you for your valuable answers. It seems that I'm the
responsible for a new section in the David Botton's Web Page (Language and
Technique Examples -> Basic) :-) Thanks again.

--
Ricardo Palomares Martínez -------- mailto:ricardo@eucmax.sim.ucm.es
UCM - Servicio Informático Gestión -- http://www.ucm.es/info/gstwsig





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

* Re: No FAQ? A stupid question, then?
  1998-11-27  0:00 No FAQ? A stupid question, then? Ricardo Palomares Martínez
                   ` (3 preceding siblings ...)
  1998-11-30  0:00 ` Ricardo Palomares Martínez
@ 1998-12-01  0:00 ` Tom Moran
  4 siblings, 0 replies; 6+ messages in thread
From: Tom Moran @ 1998-12-01  0:00 UTC (permalink / raw)


>get the string expression of integer
>and real numbers
  This exact question was answered here a couple of weeks ago, and I
see it's been answered again.  www.dejanews.com keeps comp.lang.ada
and would be a good place to look for this sort of thing.  Using an
attribute is admittedly non-obvious, but, by analogy to sprintf, you
could look at ada.text_io and see that one form of Put takes a string,
rather than a file, as its destination.




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

end of thread, other threads:[~1998-12-01  0:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-11-27  0:00 No FAQ? A stupid question, then? Ricardo Palomares Martínez
1998-11-27  0:00 ` Matthew Heaney
1998-11-27  0:00 ` Stuart Palin
1998-11-27  0:00 ` David Botton
1998-11-30  0:00 ` Ricardo Palomares Martínez
1998-12-01  0:00 ` Tom Moran

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