# Type

### Introduction

The "Type" property on a variable defines what kind of data the variable can hold. For example, the "string" type would be used for variables which should hold words and sentences, "float" and "int" may be used for variables which should hold numbers, and the "bool" value is useful for variables which old true or false values.

### How to set Type

The type of the variable depends on whether the variable is an exposed, tunneled, or "new" variable:

* If the variable is an exposed variable, then the type of the variable is set by the given element. For example, the X variable on Entities will always be a "float" type.
* If the variable is a tunneled variable, then the type is defined by the variable being tunneled to. It is possible for a tunneled variable to convert the type to a new type.
* If the variable is a new variable, then the type of the variable is defined by the new variable window.

### Available types

Variable types fall into one of three categories:

1. Primitive types (int, float, string, bool)
2. Non-primitive types used in tunneled variables (such as Color in a Circle)
3. Project-specific types (types defined in spreadsheet files)

The default value for any variable of a primitive type can be set in Glue. Some non-primitive types can be set in Glue. Project specific types can (at the time of this writing) only be set in code.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flatredball.com/flatredball/glue-reference/variables/glue-reference-type.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
