shithub: mc

ref: 75e90d91c0c50fb64812e61c21da8cbc8f1d3e5e
dir: /lib/std/assert.myr/

View raw version
use "fmt.use"
use "syswrap.use"
use "varargs.use"

pkg std =
	const assert	: (cond : bool, fmt : byte[:], args : ... -> void)
;;

const assert = {cond, msg, args
	var ap

	ap = vastart(&args)
	if !cond
		std.fputv(2, msg, &ap)
		suicide()
	;;
}