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

Home » Public Forums » archive » Re: renaming a variable without making a copy
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: renaming a variable without making a copy [message #68919] Wed, 09 December 2009 05:19 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
alx writes:
.
> Here is a question, maybe related to the previous one, regarding
> variable typecast in IDL.
> Changing the type of one scalar variable, even a vector, is fairly
> easy by using the FIX function.
> But let suppose that I get a variable (for instance from an external
> routine, by reading a shared memory,
> a socket, etc...) that is described as a vector of byte (or integer or
> float or anything else).
> I want to further consider this variable as a (elsewhere defined)
> structure (in the IDL sense).
> In other words, I want to typecast an untyped variable to a structured
> one : what is the way in IDL ?

There is no general way. Structures often have "hidden"
information inside them, mostly to align fields of data
with machine words, etc. Unless you know *exactly* how
a structure is built in whatever language you are dealing
with, it will be difficult to convert a stream of bytes
back into a structure on the IDL side of things. I've
heard of it being done, but I think it is fraught will
peril. :-)

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.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: journal call broken with 7.x
Next Topic: Re: Apropos of Nothing

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

Current Time: Wed Oct 08 15:33:49 PDT 2025

Total time taken to generate the page: 0.00451 seconds