Very basic question, but just reading through source code and trying to tell what the ' is for and how it differs from .
Very basic question, but just reading through source code and trying to tell what
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The
'character is used to introduce an attribute.For example,
Integer'Lastis the largest value of typeInteger, andFloat'Digitsis the decimal precision of typeFloat.The complete list of language-defined attributes is in Annex K of the Ada Reference Manual.
It’s also part of the syntax of qualified expressions, such as
Some_Type'(expression).The
.character is used, among other things, to introduce a record component name, such asObj.Comp, whereObjis a record variable andCompis a component of that record.Attributes are defined by the language or by the implementation; component names are defined when the record type is defined.
The apostrophe is also used to delimit character literals:
'x'.