user9329905
user9329905

Reputation:

Ada - How Can I Get the 'First' and 'Last' Attributes of a Two-Dimensional Array?

Let's say I have declared a type for a two-dimensional array and a variable of that type:

type Array2D is array(Positive range <>, Positive range <>) of Integer;
array : Array2D(1 .. 7, 1 .. 8);

The value of array'First is now 1, and the value of array'Last is now 7. How would I go about accessing the 'First' and 'Last' attributes of the second dimension of the array?

Upvotes: 2

Views: 391

Answers (1)

user1375602
user1375602

Reputation:

You may access it with explicit dimension mark array'First(n) See more here https://en.m.wikibooks.org/wiki/Ada_Programming/Attributes/%27First

Upvotes: 5

Related Questions