Hub Nexus
업데이트됨

작가아직 작성자가 없습니다맡기

개선할 점이 보이나요? 변경을 제안하세요.

후원

Computing » Computer Science » Computer Programming » Ada Programming

When entities like variables or subprograms are declared, certain properties thereof normally are left to the compiler to specify (like the size or the address of a variable, the calling convention of a subprogram). Properties which may be queried are called Attributes; those which may be specified are called Aspects. Some aspects correspond with attributes which then have the same name. Aspects and attributes are defined in the Ada Reference Manual Annex K: Language-Defined Aspects and Attributes [Annotated], pragmas in Annex L: Language-Defined Pragmas [Annotated].

Description

This language feature has been introduced in Ada 2012.

Aspects are certain properties of an entity that may be specified, depending on the kind of entity, by an aspect specification as part of its declaration or by a separate attribute definition clause or pragma declaration.

Aspect_Specification ::=
with Aspect_Name [ => Aspect_Definition] {,
Aspect_Name [ => Aspect_Definition] } ;

Attribute_Definition_Clause ::=

  • for entity_name'attribute_designator use expression;
    | for entity_name'attribute_designator use name;

pragma Name (Parameter_List);

If an aspect is not specified, it depends on the aspect itself whether its value is left to the compiler or prescribed in the Ada RM.

The specification of a Boolean valued aspect may omit the aspect definition, which then has the value True.

Examples of such properties are the size of a type, i.e. the number of bits a stand-alone object of that type will use; or that a subprogram will not return from its call: aspect No_Return. This latter one is an example of an aspect that has a Boolean value.

List of language defined aspects

If not marked otherwise, an aspect is specified by an Aspect_Specification.

An aspect marked Ada 2012 is an Ada 2012 language functionality not available in previous Ada generations.

An aspect marked Ada 2022 is an Ada 2022 language functionality not available in previous Ada generations.

Aspects not so marked, were previously defined via pragmas or attribute definition clauses.
This is still possible, but deprecated.

A – D

Aggregate (Ada 2022; Aspect_Specification)

E – O

P – Z

List of implementation defined aspects

The following pragmas are not available in all Ada compilers, only in those that had implemented them.

Currently, there are only listed the implementation-defined pragmas of a few compilers. You can help Wikibooks adding specific aspects of other compilers:

GNAT
Implementation defined aspect of the GNAT compiler from AdaCore and FSF.

See also

Wikibook

Ada 2012

Ada 2022

Where this page came from

This page was imported from Wikibooks. From “Ada Programming” on Wikibooks, by its contributors, under CC BY-SA 4.0. Changed here: set as a page; navigation and edit links left out; each image under its own licence, credited in its caption.

Nobody has written it yet — it is the source material at a new address, which is why search engines are asked to skip it and why no one earns from it. It is up for grabs: take it on, and it is yours to rewrite and to earn from.

이 페이지가 속한 매거진Ada Programming

언어English

이용 허락: CC BY-SA 4.0 · 출처 en.wikibooks.org

1

0

0

0

Spinner Logo

코멘트

Spinner Logo
버전: 2CC0 1.0 — public domain
The runaway star that left the Tarantula Nebula
버전: 2CC0 1.0 — public domain
The Blackwell School, where segregation had no law behind it
버전: 2CC0 1.0 — public domain
The Eagle Nebula, seen in the infrared
버전: 2CC0 1.0 — public domain
The house where the Equal Rights Amendment was written
버전: 2CC0 1.0 — public domain
The Aleutians, the forgotten front of the Second World War
버전: 2CC0 1.0 — public domain
The Cosmic Cliffs are not cliffs