Re: ISA documentation [message #94754 is a reply to message #94753] |
Thu, 28 September 2017 04:15  |
achim.holtmann
Messages: 1 Registered: September 2017
|
Junior Member |
|
|
Am Mittwoch, 27. September 2017 20:02:13 UTC+2 schrieb wlandsman:
> I recently had determine if an IDL variable was a hash, so my first thought was to use the ISA() function. But the ISA documentation does not mention its use to identify a hash -- or an ordered hash, or a dictionary, or a list
>
> http://www.harrisgeospatial.com/docs/ISA.html
>
> Of course, ISA() can be used to identify a hash variable
>
> IDL> x = HASH('key1', 1, 'key2', 2)
> IDL> PRINT, ISA(x, 'HASH')
> 1
>
> Arguably, the ISA documentation can be defended because it does say that objects can be identified by their class name, and hashes, lists et al. are implemented as IDL objects
>
> IDL> help,/obj,x
> ** Object class HASH, 1 direct superclass, 7 known methods
>
> Still, I would think that the use of ISA() for hashes and lists et al. should be explicitly mentioned in the ISA() documentation. --Wayne
I agree with your request.
Additionally, it should be mentioned in the documentation that ISA(x, 'HASH') returns 1 and ISA([x,x], 'HASH') returns 0.
This has been discussed here: https://groups.google.com/forum/#!topic/comp.lang.idl-pvwave /HP5TBhuP02Y
--Achim
|
|
|