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

Home » Public Forums » archive » error with struct expression
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
error with struct expression [message #89304] Fri, 15 August 2014 00:52 Go to next message
g.nacarts is currently offline  g.nacarts
Messages: 148
Registered: November 2013
Senior Member
Hi

I have a function and I return the following as a structure.

RETURN, {A:A, $
B:B, $
C:C}

When I want to return just one RETURN, {A:A} I got the following error ''Struct expression not allowed in this context: <STRUCT Array[1]>.''

Does anyone came across with something like this before?

With thanks
Re: error with struct expression [message #89305 is a reply to message #89304] Fri, 15 August 2014 06:31 Go to previous message
Mats Löfdahl is currently offline  Mats Löfdahl
Messages: 263
Registered: January 2012
Senior Member
Can you show us a minimal example that gives that error message?

Because this appears to work:

stru.pro:
----
function test, X
A = X
RETURN, {A:A}
end

help, test(15)

end
----

IDL> .rn stru
% Compiled module: TEST.
% Compiled module: $MAIN$.
** Structure <cf57b8>, 1 tags, length=2, data length=2, refs=1:
A INT 15
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: help with appending strings
Next Topic: basic IDL_IDLBridge question

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

Current Time: Wed Oct 08 13:45:31 PDT 2025

Total time taken to generate the page: 0.00483 seconds