code: 9ferno

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