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

Home » Public Forums » archive » Referencing structure inline
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Referencing structure inline [message #89832] Mon, 08 December 2014 20:57 Go to previous message
TimB is currently offline  TimB
Messages: 6
Registered: April 2011
Junior Member
Perhaps a fundamental misunderstanding on my part but I'm wondering if there is a way of making this work:

IDL> z = {x:1,y:2}
IDL> z.x
1
IDL> ({x:1,y:2}).x
% Object reference type required in this context: <STRUCT Array[1]>.

I have a function which returns a structure and I would like to use it in this manner:

z = (myfunc(input)).x

However I get the same error as the example above. The following works

struct = myfunc(input)
z = struct.x

Can it be done in one line?
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Type conversion error: Unable to convert given STRING to Long.
Next Topic: loop for XML

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

Current Time: Wed Oct 08 11:35:36 PDT 2025

Total time taken to generate the page: 0.00468 seconds