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

Home » Public Forums » archive » Bug(s) in debugger? Breakpoint stepping for nested HASH's.
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Bug(s) in debugger? Breakpoint stepping for nested HASH's. [message #79687] Thu, 22 March 2012 15:37
JDS is currently offline  JDS
Messages: 94
Registered: March 2009
Member
Add a breakpoint to the foreach line in this:

;===============
hash=hash('foo',hash('a','twenty','b','thirty'), $
'boo',hash('y','unicorn','z','pixie'))

foreach item,hash['boo'],itemname do begin
print,itemname,': ',item
endforeach

END
;===============

and attempt to step through. Two issues:

1) you must use .so to step "over" the hash calls (even implicit ones like hash indexing), since the debugger for some unknown reason steps *into* the opaque routine HASH, e.g.:

IDL> .s 1
% Stepped to: HASH::_OVERLOADBRACKETSRIGHTSIDE

Since we don't have source code to HASH, stepping into it seems rather unhelpful.

2) you can't step through this loop to completion, although it compiles and runs cleanly. The complaint:

% String expression not allowed in this context: ITEM.
% Execution halted at: $MAIN$ 6

This seems to be specific to iterating over a hash nested inside another one. I'd guess the debugger is rather confused about the new hash iteration in foreach.

JD
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: New color palette
Next Topic: Regrid / Interpolation Question

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

Current Time: Fri Oct 10 16:19:50 PDT 2025

Total time taken to generate the page: 0.40008 seconds