Debuging [message #90404] |
Sun, 01 March 2015 07:23  |
d.poreh
Messages: 406 Registered: October 2007
|
Senior Member |
|
|
Folks,
hi,
I used to work with debug like this on IDL 7:
pro test , debug
do something...
if debug then print, 'cod startup is done'
end
this is not working in IDL 8. Will you pleas give me some tips to solve this.
Cheers,
Dave
|
|
|
|
Re: Debuging [message #90406 is a reply to message #90405] |
Sun, 01 March 2015 09:55   |
d.poreh
Messages: 406 Registered: October 2007
|
Senior Member |
|
|
On Sunday, March 1, 2015 at 7:46:40 PM UTC+3:30, Matthew Argall wrote:
> What isn't it working? What is the error message? How are you calling test.pro? What is "do something" doing? Can you reproduce the error in something simple?
Hi,
this the error>
IDL> cd, 'C:\Documents and Settings\Dave\Desktop\data2\test\ENEA_lidar'
IDL> enea
% Compiled module: ENEA.
% Variable is undefined: DEBUG.
this a widget for reading and plotting laser data. i read some *.txt files, and and do some analysis, and then plotting. i have run this code on idl 7 but now that i have idl 8.0, this error is coming up.
Cheers,
|
|
|
|
Re: Debuging [message #90408 is a reply to message #90407] |
Sun, 01 March 2015 10:34  |
d.poreh
Messages: 406 Registered: October 2007
|
Senior Member |
|
|
On Sunday, March 1, 2015 at 9:44:16 PM UTC+3:30, Matthew Argall wrote:
>> % Variable is undefined: DEBUG.
>
>
> You have not assigned a value to the variable DEBUG
>
> IDL> help, a
> A UNDEFINED = <Undefined>
> IDL> if a then print, 'Debugging!' else print, 'Not debugging.'
> % Variable is undefined: A.
> % Execution halted at: $MAIN$
>
>
> Interestingly, !NULL does not behave the same way
>
> IDL> b = !Null
> IDL> help, b
> B UNDEFINED = !NULL
> IDL> if b then print, 'Debugging!' else print, 'Not debugging.'
> Not debugging.
yes that was the problem. i fixed that.
Thanks again,
Cheers,
Dave
|
|
|