---
title: "is — Conditional type execution"
description: "iXML command is: Conditional type execution."
canonical_url: "https://www.zeyos.com/ixml/ref/is"
markdown_url: "https://www.zeyos.com/ai/guide/ixml/ref/is.md"
section: "ixml-reference"
authority: "reference"
language: "en"
source_repository: "https://cloud.zeyos.com/__doc/ixmldoc.xml"
source_sha256: "a23f04e6a98628ca3c273c3b8dd2c33c034cfda3e0f00478d8793074fd2f70dd"
---

# is — Conditional type execution

The IS construct is a control flow structure that allows for conditional execution of code dependent on the data type of a variable.

If the condition is true, the embedded code is executed. Otherwise, a series of embedded ELSEIF and ELSEIS statements is tested one by one. Only the first ELSEIF or ELSEIS statement that is found to be true will be executed. If none of the conditions are true, the embedded ELSE statement will be executed instead.

### Attributes
| Name | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
| var | var |  | Variable name |
| type | type | valid | Type |

#### Possible values
Possible values for `type`:
- valid — Is valid (defined and not NULL nor FALSE)
- non-valid — Is not valid
- empty — Is empty (non-valid, numeric zero, empty string or empty array)
- non-empty — Is not empty
- defined — Is defined
- undefined — Is undefined
- null — Is NULL
- non-null — Is not NULL
- true — Is TRUE
- non-true — Is not TRUE
- false — Is FALSE
- non-false — Is not FALSE
- bool — Is a boolean
- non-bool — Is not a boolean
- int — Is an integer number
- non-int — Is not an integer number
- float — Is a floating point number
- non-float — Is not a floating point number
- string — Is a string
- non-string — Is not a string
- array — Is an array
- non-array — Is not an array
- function — Is a function
- non-function — Is not a function
- macro — Is a macro
- non-macro — Is not a macro
- class — Is a class
- non-class — Is not a class
- number — Is a number
- non-number — Is not a number
- numeric — Is numeric
- non-numeric — Is non-numeric
- scalar — Is scalar
- non-scalar — Is non-scalar
- subroutine — Is a subroutine
- non-subroutine — Is not a subroutine
- complex — Is a complex type
- non-complex — Is not a complex type
- nan — Is not a number (NaN)
- infinite — Is positive or negative infinite (INF)


### Children
- elseif (occurrence: multiple) — Elsewise conditional value execution
- elseis (occurrence: multiple) — Elsewise conditional type execution
- else (occurrence: single) — Elsewise execution

### Parents
- (not restricted in the reference)

### Result
- (none documented)

### Examples

```xml
<set var="name">iXML</set>

<is var="name" type="string">
	<output>My name is a string!</output>
</is>

<!-- My name is a string! -->
```
