BOOL
A boolean type. Values are true
and false
.
For example:
set beresp.cacheable = true;
Integer literals may not be used to assign to a BOOL variable.
Likewise there is no implicit conversion to INTEGER types:
declare local var.i INTEGER;declare local var.b BOOL;set var.b = true;set var.i = 0;set var.i += var.b; /* invalid */
Nor may STRING literals be used for assignment (i.e. "true"
rather than true
), however BOOL values may be converted to a STRING, and are rendered
as "1"
and "0"
for true
and false
respectively:
declare local var.b BOOL;set var.b = true;log var.b; /* equivalent to "1" */