From: cyrus@pprg.unm.edu (Tait Cyrus)
Subject: ada calling [C,FORTRAN] routines
Date: 3 Dec 88 01:31:23 GMT [thread overview]
Message-ID: <23675@pprg.unm.edu> (raw)
I am sure this has been hashed around a lot, but I am VERY new to
this group, as well as knowing VERY little about ada.
I need to be able to call a C routine from ada. The problem is
that I don't have the C source to this routine so I have to use
the existing file.o. In addition, the calling sequence to this routine
has to be flexible enough to allow a variable number of args
as well as character string args that vary in length. Below are
example calling sequences:
my_exec( 1 )
my_exec( 2, "file", 1 )
my_exec( 3, buffer, len )
my_exec( 4, buffer, len, 0 )
.... etc
I could create different routines for each case:
my_exec1()
my_exec2( "file", 1 )
my_exec3( buffer, len )
my_exec4( buffer, len, 0 )
which would work, but how do I handle passing variable length character
strings.
Unfortunately, this project needs to be finished ASAP, so I can't speed
a lot of time RTFM, so I would appreciate ANY comments, suggestions on
places to look, recommendations on books to read, PD examples, flames.....
Thanks in advance
---
@__________@ W. Tait Cyrus (505) 277-0806
/| /| University of New Mexico
/ | / | Dept of ECE - Parallel Processing Research Group
@__|_______@ | Albuquerque, New Mexico 87131
| | | |
| | hc | | e-mail:
| @.......|..@ cyrus@pprg.unm.edu
| / | /
@/_________@/
reply other threads:[~1988-12-03 1:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox