Ada Programming/Attributes/'Count
< Ada Programming < AttributesComputing » Computer Science » Computer Programming » Ada Programming

Description
X'Count is an Ada attribute where X is an entry point in a protected type. This attribute returns the number of tasks currently enqueued waiting for entrance into the entry procedure.
Example
protected type My_Protected_Type is entry My_Entry; procedure Get_Count( Task_Count : out Natural ); end My_Protected_Type; ... procedure body Get_Count( Task_Count : out Natural ) is begin Task_Count := My_Entry'Count; end Get_Count;
See also
Wikibook
Ada Reference Manual
- 13.3 Operational and Representation Attributes (Annotated)
- Annex K Language-Defined Attributes (Annotated)
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.