Cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

[Bug] += and -= operator not working as intended in 14.1

Legend
Legend

Hello everyone,

 

I'm having issues with the += and -= operator when trying to use it with both real and integer data types.

var changeWith : real:= 10.0
var startValue : integer := 1

for var i := 1 to 5
startValue += changeWith
next

print startValue

 

and

var changeWith : real:= 10.0
var startValue : integer := 1

for var i := 1 to 5
startValue := startValue + changeWith
next

print startValue

are not giving the same results! The same holds for -= but not the *= operator.

5 REPLIES

Re: [Bug] += and -= operator not working as intended in 14.1

Siemens Phenom Siemens Phenom
Siemens Phenom

This is a nasty bug. Man Sad

It will be fixed with the the maintenance pack.

_________________________________________________________________
Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution.

Re: [Bug] += and -= operator not working as intended in 14.1

Legend
Legend

Thanks Michael!

Re: [Bug] += and -= operator not working as intended in 14.1

Legend
Legend

Hi,

 

When will the maintenance pack be deployed ?

 

rpinon

Re: [Bug] += and -= operator not working as intended in 14.1

Siemens Phenom Siemens Phenom
Siemens Phenom

I am not sure when the maintenance pack will be released. I would guess in a month or so.

If you have a maintenance contract, you can always ask for a hotfix.

 

The bug only occurs when you use += to add a real value to an integer variable. This rarely makes sense. Maybe you can avoid that?

_________________________________________________________________
Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution.

Re: [Bug] += and -= operator not working as intended in 14.1

Legend
Legend

Hi,

yes of course.