From: Carroll, Andrew on
Okay, got the packages "instantiated" and all that and successfully appended an "element" to my list. How do I print the length to the console?

Where is count_type defined?

a wiki link would suffice so long as it has an example of how to use the mysterious count_type.


Andrew

From: Niklas Holsti on
Carroll, Andrew wrote:
> Okay, got the packages "instantiated" and all that and
> successfully appended an "element" to my list.

Good!

> How do I print the length to the console?

Assuming your list package is named Thing_Lists and your list object is
named Things, of type Thing_Lists.List:

Ada.Text_IO.Put_Line (
"The length is"
& Ada.Containers.Count_Type'Image (Thing_Lists.Length (Things)));

> Where is count_type defined?

In the package Ada.Containers.

--
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
. @ .