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

Home » Public Forums » archive » Re: Typeconversion within structure?
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
Re: Typeconversion within structure? [message #63089] Tue, 28 October 2008 07:25
David Fanning is currently offline  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.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Typeconversion within structure?
Next Topic: Re: Threads in IDL 7.0

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

Current Time: Wed Oct 08 17:28:30 PDT 2025

Total time taken to generate the page: 0.00366 seconds