Re: Typeconversion within structure? [message #63089] |
Tue, 28 October 2008 07:25 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Bernhard Reinhardt writes:
> is it possible to convert the type of an array contained in a structure?
>
> IDL> help , test.data
> <Expression> INT = Array[23]
> IDL> test.data=float(test.data)
> IDL> help , test.data
> <Expression> INT = Array[23]
> ^^^
> No Error, but still an INT_ARRAY
If the structure field is a pointer, it is. :-)
In fact, this is pretty much the *reason* for pointers in
IDL. Because otherwise, objects (read named structures)
would have had no chance of working, since you would never
know ahead of time what was going to be stored there.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|