|
Re: The old Exelis/ITTVIS/RSI contrib directory [message #94762 is a reply to message #94761] |
Fri, 29 September 2017 13:10   |
Jim Pendleton
Messages: 165 Registered: November 2011
|
Senior Member |
|
|
On Friday, September 29, 2017 at 1:28:14 PM UTC-6, wlandsman wrote:
> The old IDL website used to have a "contrib" directory of supplemental procedures contributed both by users and by Exelis/ITTVIS/RSI staff. The current Website has a similar area
>
> http://www.harrisgeospatial.com/MyAccount/Extensions.aspx
>
> but it only includes procedures submitted after April 2014. I was looking for a couple of older procedures including struct_equal.pro. Does anyone know if these are still archived anywhere?
>
> Former links to the contrib directory include the following:
>
> http://www.rsinc.com/codebank/search.asp?search=category& ;product=IDL&catid=31
> http://www.ittvis.com/codebank/search.asp?FID=311
> http://www.exelisvis.com/Default.aspx?tabid=1540&id=1175
>
> Thanks, -Wayne
Is this the one?
;+
; <FUNCTION struct_equal>
; Tests whether two IDL structures are 100% identical in value or no
;
; @Param
; s1 {in} {required} {type=IDL Structure}
; Any IDL Structure to compare to argument 's2'
;
; @Param
; s2 {in} {required} {type=IDL Structure}
; Any IDL Structure to compare to argument 's1'
;
; @Returns
; Boolean 0|1, 1 if the structures are identical in value, otherwise 0
;-
FUNCTION struct_equal, s1, s2
s1Names = tag_names(s1)
s2Names = tag_names(s2)
if ~array_equal(s1Names, s2Names) then return, 0
nTags = n_elements(s1Names)
for i = 0, nTags-1 do begin
s1TagSize = size(s1.(i))
s2TagSize = size(s2.(i))
if ~array_equal(s1TagSize, s2TagSize) then return, 0
; Check for structure datatype
if size(s1.(i), /TNAME) eq 'STRUCT' then begin
if ~struct_equal(s1.(i), s2.(i)) then return, 0
break
endif
if n_elements(s1.(i)) eq 1 then $
if (s1.(i))[0] ne (s2.(i))[0] then return, 0
if n_elements(s1.(i)) gt 1 then $
if ~array_equal(s1.(i), s2.(i)) then return, 0
; Do nothing if both tags have no elements
endfor
return, 1 ; Arrays
END
I don't know what organization within the company is making decisions about which old contributed files are to be exposed on the website. I'm sure there is nothing restricted about this function, however.
|
|
|
|