[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

delvar v/s reset_session



Puzzle: Somehow, using .RESET_SESSION in between DELVARs seems
to confuse the IDL environment.  Now, I believe using DELVAR
inside even a main program is frowned upon (I don't know why), 
but this seems very bizarre.

Here's a simple test program:

 > cat test.pro
 a=1 & b=2 & c=3
 print,a,b,c
 delvar,a,b
 end

and running it repeatedly, resetting the session in between,
quickly starts producing garbage.  Whose fault is this --
DELVAR's, .RESET_SESSION's, or mine?

IDL> print,!version
{ sparc sunos unix 5.3 Nov 11 1999}
IDL> .run test
% Compiled module: $MAIN$.
       1       2       3
IDL> .reset_session
IDL> .run test
% Compiled module: $MAIN$.
       1       3       3
IDL> .reset_session
IDL> .run test
% Compiled module: $MAIN$.
       3       2       3
% Internal error: Deleting variable.
% Execution halted at:  $MAIN$              4 /fubar/SCAR/pro/.undone/test.pro
IDL> 

Any idea what's going on?

Thanks,
Vinay

-- 
______________________________________________________________________________
kashyap@head-cfa.harvard.edu         617 495 7173 [CfA/P-146] 617 496 7173 [F]