Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Piping to/from Ada program to a C++ program

Tags:

c++

pipe

ada

I have used pipes in C/C++ before but I'm working on setting up a pipe in some legacy Ada code...however I am still in the "learning" phase with Ada and there's a lot I still don't yet know.

That being said, I've been trying to figure out how pipes in Ada are setup & how to go about using them. I've only found these articles thus far:

  1. A Thick Ada 95 Binding for Unix Child Processes and Pipes
  2. Package: Util.Pipes
  3. Pipes - ada-util.

Don't get me wrong they have a lot of good knowledge in them, but 1 is geared towards Ada95 (I have the ability to compile up to Ada05), 2 just lists the functions, & 3 offers little in the way of explanation.

Does anyone know of a tutorial for Ada pipes? Or better yet, could someone give a quick example of how to implement a simple pipe in Ada?

I realize that this is not the most ideal question to ask, but I'm running out of "Google Combinations"...

like image 231
redhotspike Avatar asked Jun 08 '26 11:06

redhotspike


1 Answers

You might be more interested in Streams -- http://en.wikibooks.org/wiki/Ada_Programming/Input_Output/Stream_Tutorial

Especially since, if you make a package that binds a stream to a pipe you get free access with Type_Name'Read( stream, object ) & Type_Name'Write( stream, object ).

like image 53
Shark8 Avatar answered Jun 10 '26 02:06

Shark8



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!