comp.lang.ada
 help / color / mirror / Atom feed
* ada calling [C,FORTRAN] routines
@ 1988-12-03  1:31 Tait Cyrus
  0 siblings, 0 replies; only message in thread
From: Tait Cyrus @ 1988-12-03  1:31 UTC (permalink / 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
 | /        | /
 @/_________@/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1988-12-03  1:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1988-12-03  1:31 ada calling [C,FORTRAN] routines Tait Cyrus

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