code: 9ferno

ref: 568002402f2e2c18e807e80903c20337af523412
dir: /tests/return.b/

View raw version
implement Emuinit;
include "sys.m";
	sys: Sys;

Emuinit: module
{
	init: fn();
};

init()
{
	sys = load Sys Sys->PATH;
	a : int;

	a = calc(100);
	sys->print("returned %d\n", a);
}

calc(n: int): int
{
	a : int;

	a = n * n + 100;
	return a;
}