Page 1 of 1

+= operator not working anymore?

Posted: Wed Oct 23, 2019 2:16 pm
by hehimself
I just upgraded from Ember 1.9 to Ember 2.0. First thing I tried was recompiling my libraries that compile smoothly with Ember 1.9. Ember 2.0 throws a syntax error at a construct similar to '$a += $b;'

Error at line 587 of script 'library.lite'.
Error is 'syntax error near [+=]'

When I change to '$a = $a + $b' the error message is gone. The same error is thrown for all instances of += in my library. It would not be a big deal replacing all instances of the += operator, but my guess is that it should work as described on page 3 of the Ember manual.


Re: += operator not working anymore?

Posted: Fri Oct 25, 2019 3:13 pm
by hehimself
A little followup:

I started with Debian 10 Buster. After some discussions with the guys at IT I switched to Ubuntu 14. I again ran into the already discussed and solved error with popen_exec.c. Other than Debian the Ubuntu compiler threw a couple of warnings, usually complaining about destination structs providing less memory than the expressions filling the structs were yielding. I'm too bad with Unix and C to see if this is relevant . . .

BUT, same error with += operator with Ubuntu 14:

ember -l library.lite
Error at line 587 of script 'library.lite'.
Error is 'syntax error near [+=]'

Recoding the expressions from $a+=$b to $a = $a + $b also works with Ubuntu.