comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Help on calling Fortran routines from IDL under linux
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Help on calling Fortran routines from IDL under linux [message #36667 is a reply to message #36586] Thu, 09 October 2003 02:34 Go to previous message
Nigel Wade is currently offline  Nigel Wade
Messages: 286
Registered: March 1998
Senior Member
David Green wrote:
> Nigel Wade <nmw@ion.le.ac.uk> wrote in message news:<bm10fa$ef8$1@south.jnrs.ja.net>...
>
>>
>> Hmm, shouldn't that be 'print, sum'? Your C wrapper puts the sum in the 3rd
>> parameter, argv[2].
>>
>> Also, your C wrapper return type is void, so s in IDL will have no value.
>
>
> Hey thanx Nigel, you are right of course, i thouhgt that the s
> variable would contain the answer however this is obviously not the
> case, do you know what it does contain?
>
> Using the fortran wrapper works fine and print, sum gives the correct
> answer. Now to apply this approach to a more complicated function...

It's the return value of the function called.

Since your external routine has void as it's return type it doesn't return
anything, so s will contain garbage.

--
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@ion.le.ac.uk
Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555
[Message index]
 
Read Message
Read Message
Previous Topic: Re: Help on calling Fortran routines from IDL under linux
Next Topic: writting formatted acsii file

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 07:44:28 PDT 2025

Total time taken to generate the page: 3.11993 seconds