shithub: mc

ref: 716c18ec85b68659886408d1f81301bf4e5f43bd
dir: /test/struct.myr/

View raw version
use std
/* test reading and writing to struct members. exits with 42. */
type pair = struct
	a : int
	b : int
;;

const main = {
	var s : pair
	s.a = 12
	s.b = 30
	std.exit(s.a + s.b)
}