val N:ℕ; val M:ℕ; type int = ℤ[-1,N]; type elem = ℤ[-1,M]; type array = Array[N,elem]; proc maximumElement(a:array,n:int): elem { var m:elem ≔ 0; var i:int ≔ 0; while i < n do { if a[i] > m then m ≔ a[i]; i ≔ i+1; } return m; }