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

Home » Public Forums » archive » ISA documentation
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
ISA documentation [message #94753] Wed, 27 September 2017 11:02 Go to next message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
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
Re: ISA documentation [message #94754 is a reply to message #94753] Thu, 28 September 2017 04:15 Go to previous message
achim.holtmann is currently offline  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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Gaussian Convolution
Next Topic: Re: Getting back on the coding horse - does anyone have any idea why IDL gives syntax errors on compile here?

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

Current Time: Wed Oct 08 07:23:36 PDT 2025

Total time taken to generate the page: 0.00408 seconds