aboutsummaryrefslogtreecommitdiff
path: root/testsuite/runnable/for_with.elna
blob: 582a6411b68c47e01e044943c087d9064c91ebcd (plain)
1
2
3
4
5
6
7
8
9
10
var
  actual: [3]Word := [0u, 0u, 0u]

program()
begin
  for element of [1u, 2u, 3u] with i do
    actual[i] := i * element^
  end;
  assert(actual = [1u, 4u, 9u])
end.