Ada Programming/Attributes/'Identity

From Wikibooks, open books for an open world
Jump to: navigation, search

Ada Lovelace 1838.jpg

Contents


[edit] Description

X'Identity is an Ada attribute where X is any task. This attribute returns a unique identifying string (of type "Task_ID"). This string is used in some Ada tasking libraries for task identification. It may also be used directly by the user for output purposes, to determine if two tasks are the same task, etc.

[edit] Example

task My_Task;
task My_Other_Task;
...
if My_Task'Identity = My_Other_Task'Identity then
  -- Do something
end if;

[edit] See also

[edit] Wikibook

[edit] Ada Reference Manual

Personal tools
Namespaces
Variants
Actions
Navigation
Community
Toolbox
Sister projects
Print/export