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

Home » Public Forums » archive » Fortran + IDL
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: Fortran + IDL [message #26371 is a reply to message #26230] Mon, 20 August 2001 13:22 Go to previous messageGo to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
fskhk@puknet.puk.ac.za (Helena Kruger) writes:
> I am working in Fortran (with a complicated program) and IDL. Up to
> now I put the output of the fortran data in a text file, go to IDL,
> read the text file in IDL and draw the graphs. For every small change
> in fortran I have to go in and out the fortran program and IDL
> program. Will it be easier and better to use ActiveX or Callable IDL
> under Windows? How and where can I learn to make the linkage?

Stein Vidar's response spawned a thought. Why aren't you using SPAWN?
One point of any programming language is to proceduralize mundane
tasks so you don't have to keep doing the tasks yourself.

You could start with something like this:

pro dofortran, array
;; Call fortran program
spawn, 'runfortran', output

;; Determine number of elements in array - assume it's a 3xN array
n = n_elements(output)
array = fltarr(3,n)

for i = 0L, n-1 do begin
v0 = [0., 0., 0.]
reads, output(i), v0
array(*,i) = v0
endfor

return
end

Obviously you will have to customize for your program name and the
number of variables, etc.

Craig
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Puzzle with floating point underflow
Next Topic: Puzzle with floating point underflow

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

Current Time: Fri Oct 10 17:17:29 PDT 2025

Total time taken to generate the page: 0.96065 seconds