ada

compatibility of declared variables

I have here a question: 6. Ada supports named equivalence. Given the declaration: A: array(1..10) of integer; B: array(1..10) of integer; Are A and B compatible? What if we declare this as A, B: array(1..10) of integer; Are A and B compatible? Yet another way of declaring this is Type array10 is array(1..10) of integer; A, B: arr...

Ada: interfacing with Matlab

Hi, since Ada doesn't possess any good libraries for scientific computing, I was wondering if anyone has been able to use Matlab mathematical functions such as eig (for calculations of eigenvalues and eigenvectors) within Ada. I see that some interfaces exist for simulink and Ada. But I'm not a user of Simulink. I would like just to...

Specifying different platform specific package at compile time in Ada (GNAT)

Hi All, I'm still new to the Ada programming world so forgive me if this question is obvious. I am looking at developing an application (in Ada, using the features in the 2005 revision) that reads from the serial port and basically performs manipulation of the strings and numbers it receives from an external device. Now my intent...

Ada: using aunit

Hi, I came across the tool aunit for writing test drivers. I write quite simple Ada programs and was wondering if it's worth to learn aunit and use it even on simple programs. I looked at the aunit manual and I didn't find easy examples to start with. Are there other sources around that show how to use aunit? I understand that using aun...

gdb and GPS: Cannot set a breakpoint on a function or procedure that is part of a protected type Ada object.

I've got a protected object that presents functions and procedures in its interface. In gdb, when I set a bp on the first line of one of those, I get odd results. Here's a snippet from my gdb console: (gdb) (gdb) b database-access_manager.adb:20001 Breakpoint 3 at 0x1a10588: file y:/svs/central_switch/controller/database/ database-ac...

Error in Ada separate file

Hello!! I am translating a Ada83 to Ada95 file. The problem happens when I try to compile a file which calls a separate. The error is "Illegal character " and refers to directive to preprocessor: with BAS_PUT; #if ADA_COMPILER="GNAT" then WITH ADA.GNAT_PUT; #else WITH ADA_PUT; #end if; separate(A_CALL_PUT) procedure .... This pr...

Ada compiler for Mac OS X 10.6

Right. I'm currently in a class that is exploring many different programming languages. Among them are COBOL and Ada, both of which I can't seem to find a free compiler. Has anyone had better luck and if so, where might I find them? Thanks! ...

GNAT - GVD: not in executable format: File format not recognized

I'm on an XP Virtual Machine running the GNU Visual Debugger 1.2.6, trying to open an Ada file (.adb), but keep getting the following error: not in executable format: File format not recognized I should also mention that I've installed both the Ada compiler kit and win32 tools for GNAT 3.14p. I've since tried opening other .adb ...

Rounding in Ada

I want to use Float'Rounding() in Ada, but I could not find in the reference what the library is where the attribute is implemented. I'm really sorry, I'm new at this, but it seems PHP and C++ have better documentation. ...

How to reset Ada.Real_Time.Clock?

Hi, when reading Ada.Real_Time.Clock right after power-up it shows a value that isn't close to zero and sometimes even negative. As far as I know Ada.Real_Time.Clock suppose to reset on power-up. How can I reset Ada.Real_Time.Clock? Thanks. ...

Ada: declarative part, function and packages

Hi, I have a query with declarative part, function and packages. I have a package as shown next. Due to the complexity of the Compute_X1 function, I have create a "is separate" for computing this function. The value returned from Compute_X1 is X1 and is to be used in the function J21 (J21 takes X1 as a first argument). Package specif...

Ada array access

Hello, I'm working in Ada95, and I'm having difficulty figuring out pointers. I have code that looks like the following: type vector is array (1 .. 3) of integer; type vector_access is access vector; my_vec : vector; procedure test is pointer : vector_access := my_vec'access; begin ... end; This fails compilation on...

Eclipse - AonixADT: "Artifact not found"

Hi a would like to intall ada plugin in eclipse, but i get always this error: "An error occurred while collecting items to be installed session context was:(profile=epp.package.java, phase=org.eclipse.equinox.internal.provisional.p2.engine.phases.Collect, operand=, action=). Artifact not found: osgi.bundle,com.aonix.a...

How do I compile and link using gnatmake with an Ada shared library?

Hi, I am having trouble compile an applicant again the Florist library. Turns out I have a larger issue with florist (same error results from both newest 2010 Adacore GPL download and 2009 version in Debian's archive). Florist has some low-level issues but when I look through the generated files it seems to be including errno.h corre...

Limit functions to be called by specific other functions in Ada

Suppose I have a procedure that I want to only have called by another specific procedure. Is it possible to force restrictions on that procedure so that it can only be referenced by the specified calling procedure? Really what I'm wanting to know, is whether there is another way to write the code so you don't have to nest/embed procedure...

Ada for new project?

We are currently developing a noncritical moving map type navcomm solution for our Atom based avionics device. The prototype has been done in Python/Qt, now I need to decide on a language to use for the "real" app. Ada or C/C++. I've been a C++ developer for 12 years and loathe the language. Ada seems promising, but I'm a little worr...

Static Referencing of Member Values - Ada

Hi I am trying out my first program in Ada of creating a single player dice game. But facing problem in maintaining score of the player. Goal: Each player has 10 turns and scores 10 points if total of 2 rolls is 7 Problem: Every time total score gets reset and 10 does not get added to current score. Total_Score is the final score to be ...

Binding Lua to Ada in win32 (xp,vista,etc.)?

There is only one public library for binding Lua to Ada I have found (http://coreland.ath.cx/code/lua-ada), but how can it be used on a Windows platform? What do I need to use in my ada-project to get lua.ads.adb libraries defined in project-files working properly? I tried to put lua sources in my ada-project directory befory compiling ...

How to control cmd-window in win32 from Ada-code?

Hi to all. I've made a simple Lua-execution in Ada, it cooly run everything I need via Lua.Load_Buffer("os.execute('wxlua.exe wx.lua')") but I don't need win32 cmd.exe-window, which is default opens on program's start-up. Is there any way to control this event directly from Ada? P.S. os.execute() sends commands directly to Windows, not...

wxWidgets for Ada?

In Lua-scripting I found wxWidgets (wxLua) library very useful, so I'd wanted to found binding for Ada and GNAT Programming Studio 2010 (4.4.1) - does it exist at all and maybe somebody know how to link it with GNAT? Only one I found is wxAda, which is about 5 years old and without any hyperlinks to load it. ...