Examples: Boolean data type


dim x
dim y As Boolean, z As Boolean

x = 1 > 2		' the expression 1 > 2 evaluates to False, so x is
				' assigned a value of False and data type Boolean
Print x 			' Output: False
Print TypeName(x)	' Output: BOOLEAN
Print DataType(x)	' Output: 11

x = True
Print x			' Output: True

Print CInt(x)		' Output: -1
Print x + 2		' Output: 1
Print x + " Blue"	' Output: True Blue

y = True
z = 0
x = y AND z
Print x			' Output: False