---
title: BOOL
summary: null
url: https://www.fastly.com/documentation/reference/vcl/types/bool
---

A boolean type. Values are `true` and `false`.

![bool-literal grammar](/reference/vcl/img/bool-literal.svg)

For example:

```vcl
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:

```vcl
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:

```vcl
declare local var.b BOOL;
set var.b = true;
log var.b; /* equivalent to "1" */
```
