tags:

views:

54

answers:

2
+1  Q: 

Rounding in Ada

I want to use Float'Rounding() in Ada, but I could not find in the reference what the library is where the attribute is implemented.

I'm really sorry, I'm new at this, but it seems PHP and C++ have better documentation.

+2  A: 

The attributes in Ada are predefined. You do not need a library for importing it.

This page could be of help: http://en.wikibooks.org/wiki/Ada_Programming/Attributes/%27Rounding

By the way, considering that the ISO standard of Ada (aka Reference Manual) is publicly available, in contrast to C++ which you have to pay for accessing it, I think Ada is much better documented, since the standard is the most complete reference of the language.

You will find more learning resources on the Ada Programming wikibook homepage.

gneuromante
+1  A: 

All of Ada's language-defined attributes (the stuff introduced by the ' character, are documented in Annex K of the LRM. They are a full part of the language, so there's no package or library you have to manually import.

I know for a beginner at first it always seems like a new language is oddly documented, because you are so much more used to how things are looked up for your old languages. However, as somebody who knows both Ada and C++ quite well, I can tell you that one thing Ada has all over C++ is how much better documented it is. You can't even get hold of a copy of the C++ LRM without paying money to ISO. Even if you pay them, what you get isn't nearly as readable by a layman as what I just linked you.

For starters, I'd suggest you save those two links above I gave you, and read entirely through Annex K. There's loads of good stuff in there. You will also want to read through Annex L (language-defined pragmas) and skim through the stuff in Annex A (predefined language environment).

T.E.D.