How to print a generic type in ada?

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.I...
more »

2017-01-06 23:01 (2) Answers

Ada OOP "generic" types for abstract type

What I want to do is make a type that, among other things, controls values that other parts of the code pass to it. This is part of a menu system, and would extend an abstract type and itself be abstract. What I would like to do is store an access. S...
more »

2016-12-02 14:12 (1) Answers

In Ada generic packages

In Ada Generic packages if I have a package that deals with any element you put in, if I would want to demonstrate that the package is working, would I have to run two separate client programs to show Integer and then Float, or could I do all that in...
more »

2016-11-14 23:11 (1) Answers

How to get this generic package to compile

I have the program to where it is reading the generic package, but I cannot figure out what to do about the context clauses to get the numbers to print and/or be read in from the file. In the client program right now, I have that the Element_Type sho...
more »

2016-11-14 18:11 (2) Answers

Ada sending byte buffer to c

I'm having an issue with interfacing to C from ada. In particular I have this ada declaration: type Byte is mod 256; pragma Convention (C, Byte); type ByteStream is array (Interfaces.C.size_t range <>) of Byte; pragma Convention (C, ByteSt...
more »

2016-10-17 18:10 (2) Answers

How to force accurate indices on a private type

I have a private type that internally uses a 2 dimensional array, while doing additional processing whenever the elements of that array are set. My package looks something like this: with MyElements; generic Width, Height : Positive; package MyP...
more »

2016-09-30 17:09 (1) Answers