I want to use Float'Rounding() in Ada, but I could not find in the reference what the library is where the a开发者_运维知识库ttribute is implemented.
I'm really sorry, I'm new at this, but it seems PHP and C++ have better documentation.
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.
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).
精彩评论