code: 9ferno

ref: ab24e5e186af64aa39cdfa03a87e7ce2eec6ad4b
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;
}