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

Home » Public Forums » archive » programmatically compile a procedure without a .pro extension
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: programmatically compile a procedure without a .pro extension [message #85663 is a reply to message #85662] Sun, 25 August 2013 05:10 Go to previous messageGo to previous message
Heinz Stege is currently offline  Heinz Stege
Messages: 189
Registered: January 2003
Senior Member
If you don't want to get a .pro file by renaming (or making a copy of)
the .bak file, you can do something like the following. The routine
below creates a temporary .pro file and includes the files with other
extensions by use of the @ include file character:

pro compile,filenames
;
tempfile='compile_temp'
openw,lun,/get_lun,tempfile+'.pro'
printf,lun,'@'+filenames,form='(a)'
free_lun,lun
;
catch,error
if ~error then resolve_routine,tempfile
catch,/cancel
;
end

The catch statement suppresses an error message from the compiler,
that there is no compile_temp routine.

Note that you can specify the filenames by a string array, if you want
to compile more than one file.

Cheers, Heinz
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Does Java polymorphism not work via the IDL Java Bridge?
Next Topic: x/y margin from map_set to plot position and cgimage

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

Current Time: Fri Oct 10 16:26:29 PDT 2025

Total time taken to generate the page: 0.47824 seconds