on foo myArray
	put "foo called" &return
	put 10 into x
	repeat while x > 0
		put 5 into y
		repeat while y > 0
			put "entry" && x & "." & y & ":" && entry y of entry x of myArray &return
			put y-1 into y
		end repeat
		put x-1 into x
	end repeat
end foo

function arrayFcn
	put "arrayFcn called" &return
	put "Mike" into garibaldi
	put 10 into x
	repeat while x > 0
		put 5 into y
		-- loop over entries of anArray
		repeat while y > 0
			put garibaldi && x & "." & y into entry y of entry x of anArray -- add data
			put y-1 into y
		end repeat
		put x-1 into x
	end repeat
	return anArray
end arrayFcn

on startUp
	put "Testing globals, subroutines and arrays:" &return
	put arrayFcn() into theArray
	foo theArray
end startUp