--- title: "toInteger" description: "Identical to the toInt expression function." --- # toInteger > Identical to the toInt expression function. **This function is used by Ignition's Expression language**. ## Description Identical to the [toInt](toInt.md) expression function. ## Syntax `toInteger(value, [failover])` ### Parameters | Type | Parameter | Description | |---|---|---| | Object | `value` | The value to type cast. | | Object | `failover` | The failover value if type casting fails. [optional] | ### Results **Integer** - The value type cast as an int. ## Examples ```python title="Code Snippet" toInteger("38") //returns 38 ``` ```python title="Code Snippet" toInteger("33.9") // returns 34 ``` ```python title="Code Snippet" toInteger({Root Container.TextField.text}, -1) //returns the value in the text box as an int, or -1 if the value doesn't represent a number. ```