summaryrefslogtreecommitdiff
path: root/test/global-arrayvar.myr
blob: c24c2d57f6ffeb77d62feadbf3b37bbee3ce0a0d (plain)
1
2
3
4
5
6
7
8
9
10
use std
/* tests that global arrays work as expected, and are zero-initialized by
* default. should exit with 7 */
var a : int[10]

const main = {
	a[0] = 3
	a[1] = 4
	std.exit(a[0] + a[1] + a[2] + a[3])
}