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 #83608 is a reply to message #83531] Mon, 18 March 2013 02:27 Go to previous messageGo to previous message
lecacheux.alain is currently offline  lecacheux.alain
Messages: 325
Registered: January 2008
Senior Member
Le lundi 18 mars 2013 10:00:58 UTC+1, Tom Grydeland a écrit :
> On Friday, March 15, 2013 8:40:56 PM UTC, Chris Torrence wrote:
>
>> Hi all,
>
>
>
>> Not to stir the pot some more [...]
>
>
>
> Not at all, it is good to hear the rationale behind decisions such as this one.
>
>
>
>> The deal-killer was that IDL structures are supposed to map directly to C structures. [...]
>
>
>
> I'll buy that.
>
>
>
>> As Mike suggests, perhaps HASH is the way to go.
>
>
>
> Either of HASH or LIST would be perfectly fine, if I were able to even assign to already-known fields of structs stored inside them:
>
>
>
> IDL> h = hash('f', {t:0})
>
> IDL> help, h
>
> H HASH <ID=198 NELEMENTS=1>
>
> IDL> print, h['f'].t
>
> 0
>
> IDL> h['f'].t = 1
>
> % Attempt to store into an expression: Structure reference.
>
> % Execution halted at: $MAIN$
>
> IDL> c = list({t:0})
>
> IDL> print, c[0].t
>
> 0
>
> IDL> c[0].t = 1
>
> % Attempt to store into an expression: Structure reference.
>
> % Execution halted at: $MAIN$
>
>
>
>
>
> It's not that I cannot imagine a way of working around this, but it seems to defeat the purpose of providing high-level data structures.
>
>
>
>> Chris
>
>
>
> --T

IDL> h = hash('f', {t:0})
IDL> help, h
H HASH <ID=1 NELEMENTS=1>
IDL> print, h['f'].t
0
IDL> h['f'] = {t:1}
IDL> print, h['f'].t
1

alx.
[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 19:12:53 PDT 2025

Total time taken to generate the page: 0.88203 seconds