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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4d1e35c40963653d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-08-12 11:17:17 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newshub2.home.com!news.home.com!news1.rdc1.sfba.home.com.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: Trying to pass strings to Fortan routines References: <3B76D0DB.313A0821@mail.verizon.net> X-Newsreader: Tom's custom newsreader Message-ID: Date: Sun, 12 Aug 2001 18:17:16 GMT NNTP-Posting-Host: 24.7.82.199 X-Complaints-To: abuse@home.net X-Trace: news1.rdc1.sfba.home.com 997640236 24.7.82.199 (Sun, 12 Aug 2001 11:17:16 PDT) NNTP-Posting-Date: Sun, 12 Aug 2001 11:17:16 PDT Organization: Excite@Home - The Leader in Broadband http://home.com/faster Xref: archiver1.google.com comp.lang.ada:11820 Date: 2001-08-12T18:17:16+00:00 List-Id: >Hideous, but it works. >I don't like having to call a Fortran subroutine as though it were C, but it >works. How does it differ from the method that got a Constraint_Error? Perhaps some tweak to the latter would make it work. In light of Dan Nagle's comment in >Actually, the Fortran standard only says what a program has to be able >to do with character arguments, not how to pass them. Popular >varieties of implementation include > >-passing character, then length, for each character argument, >-passing character with all the lengths at the end > of the calling sequence (which you have described in your post), >-and passing the address of a descriptor containing the address > and length of the character argument. Does your Gnat support Interfaces.Fortran in a way that matches your Fortran compiler? If so, that should be much easier. If they don't understand each other, they'll both have to speak some third way that they do both understand.