{ Array variables are always global variables, with constant size defined at
  parse time. Trying to declare an array size with a runtime expression (i.e. a
  non const variable), will cause a parser error. }

on init
  declare const $SIZE := 5
  declare %a[$SIZE] := ( 0,1,2,3,4 )
  declare $i

  message("num_elements(%a) = " & num_elements(%a))

  message("Initial values of array:")

  $i := 0
  while ($i < $SIZE)
    message("array[" & $i & "] = " & %a[$i])
    $i := $i + 1
  end while

  %a[0] := 2
  %a[1] := 3
  %a[2] := 5
  %a[3] := 7
  %a[4] := 11

  message("")
  message("New values of array:")

  $i := 0
  while ($i < $SIZE)
    message("array[" & $i & "] = " & %a[$i])
    $i := $i + 1
  end while

end on 
