From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=BAYES_20,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!watmath!clyde!att!rutgers!mailrus!cwjcc!tut.cis.ohio-state.edu!unmvax!pprg.unm.edu!cyrus From: cyrus@pprg.unm.edu (Tait Cyrus) Newsgroups: comp.lang.ada Subject: ada calling [C,FORTRAN] routines Message-ID: <23675@pprg.unm.edu> Date: 3 Dec 88 01:31:23 GMT Organization: U. of New Mexico, Albuquerque List-Id: 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 | / | / @/_________@/