##- # Author: Brian Tiffin # Dedicated to the public domain # # Date: September, 2016 # Modified: 2016-10-03/22:38-0400 ##+ # # array.icn, Demonstrate a single dimensional numeric array allocation # link ximage procedure main() # allocate an array of integers, default 42 a := array(6, 42) write(type(a), " is ", ximage(a)) write("a[5] = ", a[5]) every i := 1 to 10 do a[i] := i write("a[5] = ", a[5]) r := array(6, 42.0) write(type(r), " is ", ximage(r)) write("r[5] = ", r[5]) every i := 1 to 10 do r[i] := real(i) write("r[5] = ", r[5]) end