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

Home » Public Forums » archive » Storing !NULL in struct
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: Storing !NULL in struct [message #83589 is a reply to message #83531] Tue, 19 March 2013 01:59 Go to previous messageGo to previous message
Yngvar Larsen is currently offline  Yngvar Larsen
Messages: 134
Registered: January 2010
Senior Member
On Tuesday, 19 March 2013 04:26:50 UTC+1, bobnn...@gmail.com wrote:

> I agree. LISTs and HASHes should return a reference to their elements and not a temporary copy.

Well put. This single sentence summarizes (my position in) the discussion well.

> In addition, IDL needs a reference type that would be similar to a PTR but would not need to be de-referenced to get at what it is pointing at. It could use de-referencing (or a function call) to set the reference but then would allow syntax like a normal variable. This would greatly simplify IDL programing and could perhaps be used to fix the mess that IDL LISTs and HASHes are.

I often use C =TEMPORARY(*P) in these situations, but then the contents of the pointer is then left undefined, and needs to be put back after use with P = PTR_NEW(C, /NO_COPY). Your suggestion would make this much easier.

--
Yngvar
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: HASH makes too many temporaries
Next Topic: MGlib IDL library

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

Current Time: Fri Oct 10 01:53:01 PDT 2025

Total time taken to generate the page: 0.16027 seconds