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

Home » Public Forums » archive » Re: noop?
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: noop? [message #53431 is a reply to message #53291] Fri, 13 April 2007 06:28 Go to previous message
Ingo von Borstel is currently offline  Ingo von Borstel
Messages: 54
Registered: September 2006
Member
Hi,
>>>
>>> Does IDL have some kind of noop statement? I'm looking for something to
>>> anchor breakpoints at a point where several control statments have their
>>> ends...

I sometimes have the same problem. I wrote myself a tiny function
"is_debug" and add a debug keyword to the functions I'm testing. My code
then reads somewhat like this:

PRO procedure_to_be_tested, param1, param2, debug=debug

this_debugvalue = 8
if not keyword_set(debug) then debug=0

for i=0,10000 do begin
for j=0,10000 do begin
for k=0,10000 do begin
do something
endfor
endfor
if is_debug(this_debugvalue,debug) then stop
endfor

FUNCTION is_debug, debug, value

RETURN, (debug AND value) eq value

END

If you set this_debugvalue to the n-th power of 2, you have a check
whether the n-th bit is set within the debug variable. Then, if the n-th
bit of debug is set, your procedure will stop. It will run normally
without stop, if you don't call it with the debug keyword.

I'm pretty sure there's a more elegant solution, but it works for me;

Best regards,
Ingo

--
Ingo von Borstel <newsgroups@planetmaker.de>
Public Key: http://www.planetmaker.de/ingo.asc

If you need an urgent reply, replace newsgroups by vgap.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: problem with widget_draw and draw_button_events under windows
Next Topic: Rotating 3D image

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

Current Time: Thu Oct 23 01:38:48 PDT 2025

Total time taken to generate the page: 1.76531 seconds