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=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,23c28b14f995b7d4 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-11-05 17:15:29 PST Path: bga.com!news.sprintlink.net!hookup!news.mathworks.com!usenet.eel.ufl.edu!usenet.cis.ufl.edu!caen!msuinfo!harbinger.cc.monash.edu.au!aggedor.rmit.EDU.AU!goanna.cs.rmit.oz.au!macdale.cs.rmit.edu.au!dale From: Dale Stanbrough Newsgroups: comp.lang.ada Subject: Re: Interfaces.C Date: 6 Nov 1994 01:15:29 GMT Organization: RMIT, Melbourne, Australia Distribution: world Message-ID: <39hanh$1iq@goanna.cs.rmit.oz.au> References: <395o3q$2j1@wynkyn.ecs.soton.ac.uk> NNTP-Posting-Host: macdale.cs.rmit.edu.au X-UserAgent: Version 1.1.3 X-XXMessage-ID: X-XXDate: Sun, 6 Nov 94 12:18:11 GMT Date: 1994-11-06T01:15:29+00:00 List-Id: In article <1994Nov2.142450@lglsun.epfl.ch> Robb Nebbe, nebbe@lglsun.epfl.ch writes: >If you just want to pass parameters to the C function you would write: > > type Int_Array is array( Natural range <> ) of C.int > -- the range could be anything but C will treat it as starting at 0 > > procedure foo( a : in Int_Array; l : in C.int ); > pragma Import( C, foo ); > > But this says something different to void foo(int *a, int l). A better version would be procedure foo( a : in out Int_Array; l :in C.int); Will this still be passed by reference? Dale ------------------------------------------------------------- Dale Stanbrough, RMIT, Melbourne, Australia, dale@rmit.edu.au GNU Ada 94 (GNAT) => the best $0 you'll ever spend. Available for DOS, Linux, OS/2, Sun Sparc, Sun Solaris, ... Coming to a GNU supported platform near you soon...