L1VM - bool type

I did create a new variable type in Brackets. It is the boolean variable type. The two possible values are “true” or “false”. Internally the bool variable is of type “byte”.

Here is an example “set” call:

// boolean variable name must beginn with upercase B!
(set bool 1 Bool 1)

So here the boolean variable “Bool” is set to “1” (true). And “0” would be “false”.

Here is my full example:

// bool.l1com
// set boolean variable checks by using "bool" command
// only true or false allowed!
#include <intr.l1h>
#include <bool.l1h>
(main func)
	(set int64 1 zero 0)
	(set int64 1 one 1)
	(set int64 1 a 42)
	(set int64 1 b 23)
	(set int64 1 c 0)
	(set int64 1 f 0)
	// boolean variable name must beginn with upercase B!
	(set bool 1 Bool 1)
	(set byte 1 bvar 23)
	(set string s boolstr "Bool = ")
	(a c =)
	// set Bool to true if number = 42
	(((c a ==) f =) f if+)
	    (true Bool =)
	(else)
	    (false Bool =)
	(endif)
	print_s (boolstr)
	print_i (Bool)
	print_n
	exit (zero)
(funcend)