# `int` (parameter type)

Integer parameters are specified with `type="int"` in the parameter definition:

>         {name="MyInt1", type="int", default=-50},
>         {name="MyInt2", type="int", default=10, range={0,100}},
>         {name="MyInt3", type="int", default=10, range={0,100}, ui={style="slider"}},
>         {name="MyInt4", type="int", default=10, range={0,100}, ui={style="slider", unit="mm"}}

Integer parameters are represented by a spinner or slider with an edit field in the tool panel:

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

>       local myInt1 = self.parameters.MyInt1
>       local myInt2 = self.parameters.MyInt2
>       local myInt3 = self.parameters.MyInt3
>       local myInt4 = self.parameters.MyInt4

See also

- int (result type)