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

Home » Public Forums » archive » Re: structures, arrays of pointers and assignment
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: structures, arrays of pointers and assignment [message #53807 is a reply to message #53745] Wed, 02 May 2007 23:54 Go to previous message
Ingo von Borstel is currently offline  Ingo von Borstel
Messages: 54
Registered: September 2006
Member
Hi,

>> Not so easy. As mentioned above, all the routines are written such that
>> they accept variable types as used for dealing with a single set of
>> data. Wouldn't want to change their basic structure.
>
> Unless I am missing something here, isn't this just a
> case of parameter overloading. Something like this,
> added to your routines would surely suffice:
>
> IF Size(param, /TNAME) EQ 'STRUCT' THEN BEGIN
> field = param.field
> aStruct = Temporary(param)
> param = Temporary(field)
> ENDIF
>
> And then at the end of the routine, before you exit:
>
> IF N_Elements(aStruct) NE 0 THEN BEGIN
> aStruct.field = param
> param = Temporary(aStruct)
> ENDIF

Hmm... this sounds like a way to possibly go. Now I only have to make
sure to find a way how to distinguish the two different kind of structs
(both astruct and astruct.field being a struct, though a different one).
But that's feasable. Thanks for the suggestion.

Cheers,
Ingo
--
Ingo von Borstel <newsgroups@planetmaker.de>
Public Key: http://www.planetmaker.de/ingo.asc

If you need an urgent reply, replace newsgroups by vgap.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: HISTOGRAM and string data
Next Topic: Re: ENVI does a dumb thing reading a TIFF file with a palette included

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

Current Time: Mon Dec 01 17:16:49 PST 2025

Total time taken to generate the page: 0.08241 seconds