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 #53745] Wed, 02 May 2007 09:24 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Ingo von Borstel writes:

> 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

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
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: Wed Oct 08 17:02:38 PDT 2025

Total time taken to generate the page: 0.00394 seconds