[studio] wrong result in array example
Created by: mkany
I use aseba ver. 1.3.1, I try this example from "https://aseba.wikidot.com/en:asebalanguage" var a[5] = [1,2,3,4,5] # array constructor to initialise an array var b[3] = [a[1:2],0] # results in array b initialised to [2,3,0] a = a + [1,1,1,1,1] # add 1 to each element of array a => a = [b[1]+2,a[0:3]] # results in [5,2,3,4,5]
with connect to e-puck or marXbot, the result is [5,5,5,5,5] from the last line (=>) if I try a other variable (var s[4]) as temp variable like this s = a[0:3] a = [b[1]+2,s] # results in [5,2,3,4,5] the result of the last line is correct!