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

Home » Public Forums » archive » Defining Integer Field in a Structure
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: Defining Integer Field in a Structure [message #27819 is a reply to message #27736] Tue, 06 November 2001 19:07 Go to previous messageGo to previous message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
From: "Harvey Rarback" <rarback@slac.stanford.edu>
>>>> PRO newstruct__define.pro
>>>> struct = {NEWSTRUCT, a:0, b:0.0, c:fltarr(10)}
>>>> END
>> Certainly an instance of this structure gets created
>> in this routine, but its existence is fleeting. ...
> Yes. It's what I thought was happening. What bothered me
> was the overhead in creating the temporary structure.

First, the overhead is very small unless there are large amounts of data in
the structure. (And it's generally bad practice to include large amounts of
data in a named structure, because this is inflexible, so one generally uses
pointers instead.)

Second, the NEWSTRUCT__DEFINE procedure is normally run only once, when IDL
is asked to create a named structure and doesn't have a definition for it.
Of course, you can run it yourself as often as you like but this doesn't
achieve a great deal...

---
Mark Hadfield
m.hadfield@niwa.cri.nz http://katipo.niwa.cri.nz/~hadfield
National Institute for Water and Atmospheric Research



--
Posted from clam.niwa.cri.nz [202.36.29.1]
via Mailgate.ORG Server - http://www.Mailgate.ORG
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: RSI, Mac and Tru64
Next Topic: Returning A Variable Length struct to IDL from C

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

Current Time: Fri Oct 10 02:09:16 PDT 2025

Total time taken to generate the page: 7.28147 seconds