comp.lang.ada
 help / color / mirror / Atom feed
From: dummy@e.mail (Emmanuel M. D�carie)
Subject: Re: coercing an integer to a string
Date: 1998/11/18
Date: 1998-11-18T00:00:00+00:00	[thread overview]
Message-ID: <dummy-1811981536140001@dialup-180.hip.cam.org> (raw)
In-Reply-To: 72s09u$8b5@gcsin3.geccs.gecm.com

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

In article (Dans l'article) <72s09u$8b5@gcsin3.geccs.gecm.com>, John
McCabe <john@assen.demon.co.uk> wrote (�crivait)�:

>Chris Morgan <mihalis@ix.netcom.com> wrote:
>>John McCabe <john@assen.demon.co.uk> writes:
>
>>> It's even easier than it seems if you use the facilities of the
>>> language that Tom Moran has mentioned.
>
>>I gave two types of hints - algorithmic and "look in the
>>book". Anything further seemed like doing other peoples homework!
>
>Accepted. Sorry if I caused offence.

I'm sorry, I think made my homework. As I said, I'm in the process of
learning Ada. I have look under "string", "coercing", "coercion" in both
index of the two books I have on Ada that I have quoted in the original
message. How could I find by myself starting from "coerce" that the answer
was in the attribute of the type ?

Some people where kind enough to give me the beginning of an answer like
the following that was truly informative.

Integer'Image ( 1.0 ) = " 1.0"
Integer'Value ("1.0") =   1.0

Also look at the toc of the REFMAN in its website incarnation. Do you
think that its easy to find in this toc "some helpful functions in the
back of the Ada Language Reference Manual (findable on the web if you
don't have it)". The toc even don't mention the word "function".

Core Language

1. General -- TOC 
2. Lexical Elements -- TOC 
3. Declarations and Types -- TOC 
4. Names and Expressions -- TOC 
5. Statements -- TOC 
6. Subprograms -- TOC 
7. Packages -- TOC 
8. Visibility Rules -- TOC 
9. Tasks and Synchronization -- TOC 
10. Program Structure and Compilation Issues -- TOC 
11. Exceptions -- TOC 
12. Generic Units -- TOC 
13. Representation Issues -- TOC 

Annexes

A. Predefined Language Environment -- TOC 
B. Interface to Other Languages -- TOC 
C. Systems Programming -- TOC 
D. Real-Time Systems -- TOC 
E. Distributed Systems -- TOC 
F. Information Systems -- TOC 
G. Numerics -- TOC 
H. Safety and Security -- TOC 
J. Obsolescent Features -- TOC 
K. Language-Defined Attributes 
L. Language-Defined Pragmas 
M. Implementation-Defined Characteristics 
N. Glossary 
P. Syntax Summary 


Maybe its obvious for some that the answer Chris Morgan gave me was
enough, but it was not for me. I'm coming from the scripting world (so I'm
a lazy "typer"), and when I answer a question from a newbie on a mailing
list, I always, either give a complete reference (page number, URL), or a
piece of code, or both. Think how far his answer was taking me away from a
simple and quick response. I really don't want to start a flame war on
this, I waited a couple of days before writing anything more on this
thread. I don't think that I will write more on it in the future.

Cheers

<http://www.cam.org/~emm/frontierNewbieToolbox.html>

-- 
Emmanuel
emm*cam.org  where * = @




  reply	other threads:[~1998-11-18  0:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-11-16  0:00 coercing an integer to a string Emmanuel M. D�carie
1998-11-16  0:00 ` Chris Morgan
1998-11-16  0:00   ` John McCabe
1998-11-17  0:00     ` Chris Morgan
1998-11-17  0:00       ` John McCabe
1998-11-18  0:00         ` Emmanuel M. D�carie [this message]
1998-11-20  0:00           ` Dale Stanbrough
1998-11-23  0:00             ` Robert I. Eachus
1998-11-23  0:00           ` Chris Morgan
1998-11-16  0:00 ` Tom Moran
1998-11-16  0:00   ` John McCabe
replies disabled

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