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

Home » Public Forums » archive » having a routine .compile something?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
having a routine .compile something? [message #47734] Wed, 22 February 2006 07:57 Go to previous message
mmiller3 is currently offline  mmiller3
Messages: 81
Registered: January 2002
Member
Dear IDL gang,

I've written some code that saves some configuration information
by writing the IDL code needed to recreate it. For example, to
create some object instances, I call it's IDL_code method and
save the results to a text file. This file contains lines like

foo = OBJ_NEW('my_thing', args)
foo->set_param1, value
foo->set_param2, another_value

The idea is that I can recreate the object later on by reading
each line in that text file and EXECUTE'ing it. I like this
better than a save file becuase I can go and edit the saved file
easily . But now I want to go and add multi-line commands to my
saved file, like loops and such. Then I cannot use EXECUTE to
execute these commands, so I'm looking at CALL_PROCEDURE. I can
easily have my objects save a procedure, instead of a series of
single line commands. Then when I read the file, I can find the
procedure name and CALL_PROCEDURE on it. So my question is, is
there a way to .compile the contents of a file from within a
procudure or function call, so that I can CALL_PROCEDURE it?

I suspect that there is no way to do that, so I'm wondering if
anyone has suggestions for a work around. I suppose I can create
a unique procudure name and corresponding file name. Put a "PRO
unique_name, args" at the head of that file, append the contents
of my saved IDL commands, append an end, and then do a
"CALL_PROCEDURE, unique_name, args", which, as long as my
unique_name.pro file is in the IDL_PATH, will run my procesure.
Any comments or suggestions?

Mike

--
Michael A. Miller mmiller3@iupui.edu
Imaging Sciences, Department of Radiology, IU School of Medicine
[Message index]
 
Read Message
Read Message
Previous Topic: Call a method from a class
Next Topic: Re: Introducing FL

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

Current Time: Fri Oct 10 10:21:25 PDT 2025

Total time taken to generate the page: 1.12221 seconds