i am currently trying to print ("Ada.Text_IO.Put") a generic type, but this always fails with errors like that:
missing argument for parameter "Item" in call to "Put" declared at a-tiinio.ads:60, instance at a-inteio.ads:18
expected type "Standard.Integer"
found private type "My_Type" defined at testtype.ads:2
These errors make sense but I dont know how to print my values. The following lines show my generic type.
generic
type My_Type is private;
with function "+"(Left: My_Type; Right: My_Type) return My_Type;
package TestType is
...
end TestType;
Thanks for any help!
You can require another generic parameter such as the following:
Then simply print the string output by the Image function.
An example of an actual parameter might be: