18.10.2014 Views

Object-oriented Software in Ada 95

Object-oriented Software in Ada 95

Object-oriented Software in Ada 95

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

372 Appendix B<br />

O'First(n) 1 Delivers the lower bound of the<br />

n’th array <strong>in</strong>dex<br />

O'Last 1 Delivers the upper bound of the<br />

first array <strong>in</strong>dex<br />

O'Last(n) 1 Delivers the upper bound of the<br />

n’th array <strong>in</strong>dex<br />

O'Length 1 Delivers the number of elements<br />

<strong>in</strong> the first array <strong>in</strong>dex<br />

O'Length(n) 1 Delivers the number of elements<br />

<strong>in</strong> the n’th array <strong>in</strong>dex<br />

O'Range 1 Delivers the first array <strong>in</strong>dex<br />

range<br />

O'Range(n) 1 Delivers the n’th array <strong>in</strong>dex<br />

range<br />

1<br />

Type of array <strong>in</strong>dex<br />

Type of array <strong>in</strong>dex<br />

Type of array <strong>in</strong>dex<br />

Universal Integer<br />

Universal Integer<br />

O'First .. O'Last<br />

O'First(n) ..<br />

O'Last(n)<br />

Only an <strong>in</strong>stance of an unconstra<strong>in</strong>ed array may be <strong>in</strong>terrogated us<strong>in</strong>g the attribute.<br />

B.2.3Scalar objects and types<br />

Attribute Description Type of result<br />

O'First<br />

Delivers the lower bound of the Of the type of O<br />

object or type<br />

O'Last<br />

Delivers the upper bound of the<br />

object or type<br />

Of the type of O<br />

B.2.4Discrete objects<br />

Attribute Description Type of result<br />

O'Succ( val ) 1 Delivers the successor of val<br />

which is a value <strong>in</strong> the base type<br />

of T.<br />

The exception<br />

Constra<strong>in</strong>t_error is raised<br />

if the successor of O’Last is<br />

taken.<br />

Of the base type of<br />

T<br />

O'Pred( val ) 1<br />

1<br />

Delivers the predecessor of val<br />

which is a value <strong>in</strong> the base type<br />

of T.<br />

The exception<br />

Constra<strong>in</strong>t_error is raised<br />

if the predecessor of O’First is<br />

taken.<br />

Of the base type of<br />

T<br />

The attribute will only work on an <strong>in</strong>stance of discrete object and not on a discrete type.<br />

B.2.5Task objects and types<br />

Attribute Description Type of result<br />

O'Callable 1 Returns TRUE if the task object Boolean<br />

is callable<br />

O'Storage_size The storage units required for Universal Integer<br />

each activation of the task<br />

O'Term<strong>in</strong>ated 1 Returns TRUE if the task is<br />

term<strong>in</strong>ated<br />

Boolean<br />

1<br />

The attribute will only work on an <strong>in</strong>stance of task object and not on a task type.<br />

B.2.6Float<strong>in</strong>g po<strong>in</strong>t objects and types<br />

Attribute Description Type of result<br />

© M A Smith - May not be reproduced without permission

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!