Question: Can 'for' be coded in Components?

Here is my command and i will use to make the user interface.

Orginal:

for i to l do

for j from x to y do

block[i][j] := 1-block[i][j]

end do;

c_block[i] := block[i];

c_block[i] := parse(cat(c_block[i][]))

end do

Can someone help me to edit my command so that i can write it in Click Edit Action for a button? thank you.

Do(for i from 1 to %l do)
   Do(for j from x to y do)
      Do(block[i][j] = 1-block[i][j]); 
    end do);
   Do(c_block[i] := block[i]);
  Do( c_block[i] := parse(cat(c_block[i][])));
end do);

Please Wait...