comp.lang.ada
 help / color / mirror / Atom feed
From: "DuckE" <nospam_steved94@home.com>
Subject: Re: Newbie wanna Ada
Date: Fri, 26 Oct 2001 02:02:32 GMT
Date: 2001-10-26T02:02:32+00:00	[thread overview]
Message-ID: <Yu3C7.50903$Zb.25384906@news1.sttln1.wa.home.com> (raw)
In-Reply-To: 3BD87B95.2000703@maciejsobczak.com


"Maciej Sobczak" <maciej@maciejsobczak.com> wrote in message
news:3BD87B95.2000703@maciejsobczak.com...
[snip]
> 1. Is there a *usual* interface in Ada for socket-related operations?
No.
There is a package called "AdaSockets" available that provides a binding to
sockets.
There is a class library called "Claw" that includes support for sockets.
I've heard that the next version of GNAT includes a sockets package.
It is very easy to interface to the standard C library for socket-related
operations, which is exactly what I did before the options I just listed
became available.

> 2. Is there some more or less standard GUI lib? I've spot a Tcl/Tk
> binding somewhere:
>      a. How does it work?
>      b. Is it efficient?
>      c. Does it require Tcl runtime installed to run programs?
>      d. What about Qt, for example?

Since you mentioned using Linux, you'd probably be the most interested in
GTKAda, which uses the GTK toolkit.  I'm sure you can find links on
www.adapower.com

> 3. What is the level of portability of the source code? C++ suffers from
> the fact that many vendors dare to dump crap on the market with the C++
> logo on the boxes. The result is that we have many different 'dialects'
> of this (standardised) language. What about Ada? If I write something
> for GNAT, can I assume that some imaginary Windows compiler will eat it?

I have only used two Ada compilers, so I don't consider myself to be an
expert, but it has been my experience that code is very portable.
The few exceptions I have encountered have been where one of the compilers
had a minor bug that did not detect a type error in my source code.  When I
rebuilt on the other compiler it complained about the error.  After
correcting the code it worked on both systems.

It took me a couple of hours to port a 250K SLOC program from Win32 to
Linux.  The program is a multi-tasking "console mode" program that makes use
of sockets.  I had to re-write the module that interfaces with sockets from
using winsock to a standard sockets package, and that was it.

> 4. What is the possibility of interfacing Ada with C (mainly - using C
> libs from Ada)? Is this made during the linking or in the spirit of
> Native Interfaces (like in Java)? For extremists - is it possible to
> call back some Ada procedure from the C function (possibly running in
> another thread)?

Interfacing to other languages was taken into account with the design of Ada
95.
If you look at the history of this newsgroup you'll find cases of people
interfacing with C, FORTRAN and COBOL.  I personally created a DLL in Ada
that was used by a Delphi program.

> 5. Is there a CORBA binding implemented for Ada?

Yes.  As I recall there is a free CORBA binding targeting Linux, and a
commercial binding available from IONA.

>
> Thanks for your time,
>
> --
> Maciej Sobczak
> http://www.maciejsobczak.com
>
You're welcome
SteveD






  parent reply	other threads:[~2001-10-26  2:02 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-25 20:52 Newbie wanna Ada Maciej Sobczak
2001-10-25 21:30 ` tmoran
2001-10-26  9:49   ` Tony Gair
2001-10-26 12:57     ` Marc A. Criley
2001-10-26 16:31     ` tmoran
2001-10-26 13:18   ` Marin David Condic
2001-10-26 14:38     ` Ted Dennison
2001-10-26 15:42       ` Marin David Condic
2001-10-25 22:10 ` Michal Nowak
2001-10-25 23:47 ` Matthew Woodcraft
2001-10-26 13:30   ` Marin David Condic
2001-10-26  2:02 ` DuckE [this message]
2001-10-26  2:32 ` David Starner
2001-10-26  9:23   ` Preben Randhol
2001-10-26 17:22     ` David Starner
2001-10-27  8:39       ` Preben Randhol
2001-10-26 14:02 ` Ted Dennison
2001-10-26 18:02 ` Maciej Sobczak
2001-10-26 18:54   ` Marin David Condic
2001-10-26 19:39   ` Ted Dennison
2001-10-26 19:45   ` Larry Kilgallen
2001-10-27 10:17   ` Michal Nowak
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox