code: 9ferno

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