Re: Case Insensitive Hash but still preserve cases of original keys [message #89015 is a reply to message #89014] |
Tue, 15 July 2014 05:32  |
Lajos Foldy
Messages: 176 Registered: December 2011
|
Senior Member |
|
|
On Tuesday, July 15, 2014 1:11:06 PM UTC+2, SonicKenking wrote:
> What I am confused is how PRINT gets the value for the key "X"? It seems to me that it should call something like self["X"], i.e. SpecialHash::_overloadBracketsRightSide. However it is not the case and this can be verified by setting a breakpoint as well.
There is an undocumented function hash::get:
IDL> print, (hash(0,0))[0]
0
IDL> .comp hash_get
% Compiled module: HASH::GET.
IDL> print, (hash(0,0))[0]
HASH::GET called: 0
0
IDL>
hash_get.pro is:
function hash::get, key, _extra=ext
print, 'HASH::GET called: ', key
return, 0
end
PRINT probably calls self.get(...), so you can try to add a SpecialHash::Get function.
regards,
Lajos
|
|
|