praveenvvstgy / crack-language

Automatically exported from code.google.com/p/crack-language
Other
0 stars 0 forks source link

+= not working with arrays in for loop #130

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
In crack-0.8, the following code:

v := array[int](10);

for (i := 0; i < 10; i++)
   v[i] += 12;

produces the following error message:

ParseError: test.crk:4:9: token += was not expected at this time, expected 
semicolon or a block terminator
   v[i] += 12;
        ^-

Note that the follow code works just fine:

v := array[int](10);

for (i := 0; i < 10; i++)
   v[i] = v[i] + 12;

Original issue reported on code.google.com by goodwill...@googlemail.com on 29 Dec 2014 at 10:46

GoogleCodeExporter commented 9 years ago
Thank you for documenting this, it's a known issue that's tricky to resolve.  
We'll deal with this after 1.0.

Original comment by mind...@gmail.com on 30 Dec 2014 at 11:16