Questions tagged [ada95]

Use this tag if your question is specific to Ada 95, and you can't use a more recent version of the Ada standard.

Ada 95 is a joint ISO/ANSI standard (ISO-8652:1995) and was published in February 1995

Source

https://en.wikipedia.org/wiki/Ada_(programming_language)#Standardization

16 questions
5
votes
2 answers

Is is possible to have a child package as a separate compilation unit in Ada

I have a main package with a normal spec and body file. I am trying to create child packages of the parent, but want them in a separate compilation file(s). I can easily get it done if it is just a package body, or if it is a subprogram/proc/func.…
Awaken
  • 1,243
  • 2
  • 14
  • 26
3
votes
2 answers

How do you write a program where you can enter a maximum of 5 characters in a string, but also less than 5(in Ada)?

My code so far. It does not work however. I would like to be able to write something like "go", "car" or "truck", as long as it's 5 characters or less, and the programme will then write that word out. I think i need to use Get_Line an Put_Line but i…
Louise
  • 31
  • 2
3
votes
1 answer

Where is this Ada character literal format defined and what was changed in Ada 2005?

I've recently stumbled upon code similar to this, which compiled in Ada 95 mode and not in Ada 2005 mode: with Ada.Text_IO; procedure Test is Printable_Char : constant Character := '["20"]'; Non_printable_Char : constant Character :=…
Gneuromante
  • 560
  • 3
  • 12
2
votes
1 answer

Ada - accessibility check raised

I have downloaded this program from Github: https://github.com/raph-amiard/ada-synth-lib I have attemted the first example and I am presented with an exception. If anybody would be able to give me an insight into why this is, it would be massively…
Lloyd Thomas
  • 345
  • 2
  • 12
1
vote
1 answer

Possible memory leak using GNAT Regpat? What am I doing wrong?

Good evening forum, intrigued by potential memory leaks in the tool I'm writing in Ada95, I decided to run it with valgrind (valgrind-3.18.1). I'm using GNAT.Regpat for Regex support and I have compiled a series of regex patterns with it. I have 8…
1
vote
0 answers

Ada95 Calling C_Mkstemp()

This code for getting a temporary filename is returning an empty string. I'm trying to work out how it ever worked, since all doco I can find on mkstemp says it needs a format of something like /tmp/prefixXXXXXX, and here that's not being…
Kingsley
  • 14,398
  • 5
  • 31
  • 53
1
vote
3 answers

How to use a generic type?

I'm working through the example here: https://www.adahome.com/rm95/rm9x-12-08.html I've written my generic_stack.ads: generic type Item_Type is private; size : Positive; package Generic_Stack is procedure push( item : in Item_Type ); …
Kingsley
  • 14,398
  • 5
  • 31
  • 53
1
vote
0 answers

Ada95 Traceback function produces no output

Using GNATMAKE 3.13a1 (20000509), the following function seems to produce no result. That is the log messages are never written to the log, nor is the stack-trace logged. The surrounding logs, perform normally. procedure log_Stack_Trace( label : in…
Kingsley
  • 14,398
  • 5
  • 31
  • 53
1
vote
3 answers

What does => mean in Ada?

I understand when and how to use => in Ada, specifically when using the keyword 'others', but I am not sure of its proper name nor how and why it was created. The history and development of Ada is very interesting to me and I would appreciate…
Andrea
  • 43
  • 8
1
vote
1 answer

Implement an interface with class wide operations in Ada 95

I'm creating a program with Ada 95 and I have a problem. Specifically, I'm trying to implement a class which executes functors given as parameters. The behavior I want to achieve is: Declare an interface IF with a procedure Execute. Derive from IF…
Dan
  • 2,452
  • 20
  • 45
0
votes
0 answers

GTKADA GUI library : Drawing line and boxes

I am trying to create a GUI as attached image using GTKADA Library, using gtkada.style package by calling below mentioned procedure, Draw_Line(Cr:Cairo.Cairo_Context;Color:Gdk.Color.Gdk_Color;X1,Y1,X2,Y2:Glib.Gint) How to define the value for Cr :…
Angel R
  • 1
  • 1
0
votes
1 answer

Accessing locally created subprogram inside package in Ada

Can anyone please let me know, how to get access to locally created subprogram inside package in order to test the locally created subprogram independently using GNATest (Aunit), instead of integrating locally created subprogram in called…
0
votes
1 answer

Expected private type

I have a compile-error that states: "expected private type "Pekare" defined at line 3. found an access type". this is the .ads code: package Image_Handling is type Data_Access is private; type Image_Type is record X_Dim, Y_Dim :…
osclj814
  • 11
  • 3
0
votes
1 answer

ADA Object-Orientation Compile Error -- I don't understand the error

I hope that you can advise me. I'm trying to use ADA 95's Object Oriented Features for the first time, and I want two derived classes, cyclicgroup and polyggroup, to call the put() method belonging to their base class, abstractGroup. But…
0
votes
1 answer

How to automate deallocation with storage pools in Ada95

I read that user-defined Storage Pools can be made to simplify the deallocation process and in some cases even automate it. Giddy at the possibility, I have been trying to make a simple storage pool example in Ada95, but I am running into trouble. I…
silentTeee
  • 187
  • 10
1
2