comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: How to call fortran subroution?

How to call fortran subroution?
type: item
description: Hi, I havenot find a perfect example on how to call fortran subroutine from idl. For example, a(0) and a(1) are computed in an IDL program, I want a fortran subroutine to compute c=a(0)+a(1). After c has been returned, d=a(0)+a(1)+c is computed in IDL. How to do that? I think we will know how to call fortran subroutine if we can do above. 1.IDL PROGRAM: test.pro pro test a=fltarr(2) a(0)=100 & a(1)=200 call_external sum_fortran(a,c) d=a(0)+a(1)+c print,a,c,d end 2.FORTRAN SUBROUTINE: sum_fortran.f subroutine sum_fortran(a,c) dimension a(2) c=a(1)+a(2) return end Would you please help me to modify the above and tell me how to run? Can fortran call idl program? Best regards Jiali
creator: web
date: 2001-04-12T00:26:21-00:00