[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Structures:



Try using anonymous structures.  Here is a quick and dirty demo that
illustrates it can be done.  Note, you can even store structures within
anonymous structures!

I hope this helps.

Example:

pro test_struct, data

If N_Elements(data) gt 0 then print, data

data = {a:3, b:'Hello World', c:indgen(3,3)}

print, ''
help, data
print, 'Data is now:'
print, data

data = {a:4, b:'Hello World', c:indgen(4,4), d:indgen(3,3)}

print, ''
help, data
print, 'Data is now:'
print, data

end

-- 
Jason Meyers
Ph.D. Student, Center for Imaging Science
Rochester Institute of Technology
jpm7934@rit.edu