nums := [1, 2, 3, 4, 5]; println(nums); i := 0; while i < length(nums) do begin println(nums[i]); i := i + 1; end