Topic: Operator -= (1 of 4), Read 14 times
Conf: VEDIT Macro Language Support
From: Pauli Lindgren
Date: Thursday, October 15, 2009 11:37 AM

Operator -= does not work as expected. Is this a bug?

For example try this:
#1 = 10
#1 -= 5-4

After the above commands have been executed, the value of #1 is 1. One would expect that it would be 9.

You must add parenthesis in order to make this work correctly, i.e.
#1 -= (5-4)

However, += works as expected.

--
Pauli

 


Topic: Re: Operator -= (2 of 4), Read 12 times
Conf: VEDIT Macro Language Support
From: Christian Ziemski
Date: Thursday, October 15, 2009 03:10 PM

On 15.10.2009 17:37 in vedit-macro-language Pauli Lindgren wrote:
>
> Operator -= does not work as expected. Is this a bug?
>
> For example try this:
> #1 = 10
> #1 -= 5-4
>
> After the above commands have been executed, the value of #1 is 1.
> One would expect that it would be 9.
>
> You must add parenthesis in order to make this work correctly,
> i.e. #1 -= (5-4)
>
> However, += works as expected.

I would say it's a bug.

#1 = #1 - 5 - 4
#1 = #1 - (5 - 4)


Christian

 


Topic: Re: Operator -= (3 of 4), Read 14 times
Conf: VEDIT Macro Language Support
From: Christian Ziemski
Date: Thursday, October 15, 2009 03:26 PM

As far as I see all combined operators have the same problem.
Only with += and *= it isn't obvious.

e.g. /=

#1 = 12
#1 /= 2*3

#1 is 18 now...

 


Topic: Re: Operator -= (4 of 4), Read 14 times
Conf: VEDIT Macro Language Support
From: Ted Green
Date: Wednesday, October 21, 2009 04:29 PM

At 03:29 PM 10/15/2009, you wrote:
>From: "Christian Ziemski" (czml1@...) As far as I see all combined operators have the same problem.
>Only with += and *= it isn't obvious.
>
>e.g. /=
>
>#1 = 12
>#1 /= 2*3
>
>#1 is 18 now...

I agree it is a bug, but it will remain a low priority.

Ted.