In a previous function, I create and return a hash. Upon doing this, it returns the hash as a structure, and I use this as an input to this following function.
myStruct's tags are each a structure, each with a name and dataType tag.
I'm trying to iterate through each tag to find at which 'name' a certain dataType occurs.
pro plotter, myStruct
numtags = n_tags(myStruct)
names = tag_names(myStruct)
for varID = 0, numtags do begin
if ( strcmp( myStruct.(names[varID]).datatype, 'Temperature, Head 1')) then print, varID
endfor
end
I get the following error after trying to run this: "Type conversion error: Unable to convert given STRING to Long."
What is causing this error? Can I access the tag using a variable name?