shithub: limbobyexample

ref: 50bc0b3fb51052b59bf8873dc7eaf68257ef91d1
dir: /Values/values.b/

View raw version
implement Values;

include "sys.m";
include "draw.m";

sys: Sys;
print, sprint: import sys;

Values: module {
	init: fn(nil: ref Draw->Context, nil: list of string);
};

init(nil: ref Draw->Context, nil: list of string) {
	sys = load Sys Sys->PATH;

	n := 7;
	b := big 8;
	f := real 3.2;
	str := "String!";

	print("%d\n", 0 || 1);
	print("%d\n", 0 && 1);

	print("%d\n", n / int f);
	print("%f\n", real n / f);
	print("%bd\n", b / big 8);

	print("%s\n", str[:len str-1]);
	print("%s\n", str[2:]);

	print("%s", "inferno " + "os " + sprint("%c", '\n'));
	print("limbo" + " " + "lang\n");

	exit;
}