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

Home » Public Forums » archive » Re: Operator precedence flipflop?
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: Operator precedence flipflop? [message #80427] Sat, 02 June 2012 09:32 Go to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
That makes sense. Since there were no objects involved, I did not
think of that.

This seems to confirm it:

IDL Version 8.1 (linux x86_64 m64). (c) 2011, ITT Visual Information
Solutions
IDL> s={str:[ptr_new(['1','2']),ptr_new(['a','b'])]}
IDL> print,*s.str(0)
% Expression must be a scalar in this context: S.
% Execution halted at: $MAIN$
IDL> print,*s->str(0)
% Expression must be a scalar in this context: S.
% Execution halted at: $MAIN$
IDL> print,*(s->str(0))
1 2

IDL Version 8.2 (linux x86_64 m64). (c) 2012, Exelis Visual
Information Solutions, Inc.
IDL> s={str:[ptr_new(['1','2']),ptr_new(['a','b'])]}
IDL> print,*s.str(0)
1 2
IDL> print,*s->str(0)
% Expression must be a scalar in this context: S.
% Execution halted at: $MAIN$
IDL> print,*(s->str(0))
% Object reference type required in this context: S.
% Execution halted at: $MAIN$

(groups.google.com/group/comp.lang.idl-pvwave/browse_thread/ thread/
fe6ac2540db82f3b)

On Jun 2, 12:02 pm, fawltylangu...@gmail.com wrote:
> On Saturday, June 2, 2012 12:23:48 AM UTC+2, Paulo Penteado wrote:
> My guess is that the cause is the dot operator ambiguity introduced in IDL8. Probably s.str(0) in *s.str(0) is interpreted as a method call for which s must be a scalar. But I can not check, I could not find a list of fixed bugs in IDL 8.2.
[Message index]
 
Read Message
Read Message
Previous Topic: Averaging component of time variable
Next Topic: How to Write Data to File with Particular Dimension Values?

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

Current Time: Fri Oct 10 04:55:49 PDT 2025

Total time taken to generate the page: 1.52204 seconds