# `bool` (parameter type)

Boolean parameters are specified with `type="bool"` in the parameter definition.

>         {name="MyBool", type="bool", default=true}

Warning

Be aware that the type for a boolean parameter is specified as `type="bool"`, not the Lua-name `"boolean"`.

Boolean parameters are displayed as a checkbox:

The current value of a boolean parameter is accessed via `self.parameters` in `execute`, which provides a Lua `boolean`:

>       local myBool = self.parameters.MyBool
>       if myBool then
>         print("myBool is true")
>       end

See also

- bool (result type)