X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 01 Jun 2009 10:42 AM by  anon
use of DELVAR from MAIN?
 2 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
01 Jun 2009 10:42 AM
    IDL community, This is a basic question and one to which there was no reply in a posting late last year by Mike.  I am supposed to be able to use DELVAR in a main level program, at least that is my understanding. My main program exits before END when I include a call to DELVAR. How do I use DELVAR in a main program? Thank you much for any help. P.S. I have used DELVAR from the command line, but never in a routine. Steve

    Deleted User



    New Member


    Posts:
    New Member


    --
    01 Jun 2009 02:22 PM
    Brandon, Thanks for helping. Here's what I did, which seems to be a simplified version of your program. Still doesn't work. I run programs by pressing F8 and Ctrl-F8. The '>' represents the command prompt. > x = 1 > x = 2 Opened new source file and entered the following: z = x + y   delvar   , x delvar   , y print   , z end Saved file as mytest. > .run mytest Console report: % Compiled module: $MAIN$. % Active main program terminated by call to DELVAR. Do you see the problem? Steve  

    Deleted User



    New Member


    Posts:
    New Member


    --
    01 Jun 2009 02:28 PM
    Wow, that didn't come out right. Let me try again. > x = 1 >x = 2 Opened new source code file. Entered: ; --------------------------------------------- ; start code z = x + y delvar, x delvar, y print, z end ; end code ; --------------------------------------------- Saved file as "mytest". Entered at command line: .run mytest Console message: % Compiled module: $MAIN$ %Active main program terminated by call to DELVAR Why is a main program being terminated by calling DELVAR? I thought that main programs were the one place where DELVAR could be used? Thanks. Steve  
    You are not authorized to post a reply.