> For the complete documentation index, see [llms.txt](https://docs.atfinity.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.atfinity.io/rule-language/data-types.md).

# Types and Data Structures

RuLA supports four fundamental types for working with data:

| Type                                                    | Description                            | Example                       |
| ------------------------------------------------------- | -------------------------------------- | ----------------------------- |
| [String](/rule-language/data-types/strings.md)          | Text values                            | `"Hello World"`               |
| [Number](/rule-language/data-types/numbers.md)          | Numeric values (integers and decimals) | `42`, `3.14`                  |
| [List](/rule-language/data-types/lists.md)              | Ordered collections of values          | `['a', 'b', 'c']`             |
| [Dictionary](/rule-language/data-types/dictionaries.md) | Key-value pairs                        | `{'name': 'John', 'age': 30}` |

Each type has its own syntax for creation, specific operators for manipulation, and built-in functions for common operations.

## Quick Reference

### Creating Values

```
"This is a string"      # String
42                      # Number
3.14159                 # Number
['apple', 'banana']     # List
{'x': 1, 'y': 2}        # Dictionary
```

### Common Operations

| Operation           | Strings                                                   | Numbers | Lists                                                             | Dictionaries                                                |
| ------------------- | --------------------------------------------------------- | ------- | ----------------------------------------------------------------- | ----------------------------------------------------------- |
| Length              | [`LEN`](/rule-language/operators/string-operators/len.md) | -       | [`COUNT`](/rule-language/operators/list-operators/count.md)       | [`COUNT`](/rule-language/operators/list-operators/count.md) |
| Check if empty      | `LEN(text) == 0`                                          | -       | `list == []`                                                      | `dict == {}`                                                |
| Access by index/key | `text[index]`                                             | -       | `list[index]`                                                     | `dict[key]`                                                 |
| Check containment   | `text contains "x"`                                       | -       | [`contains`](/rule-language/operators/list-operators/contains.md) | [`in`](/rule-language/operators/dictionary-operators/in.md) |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.atfinity.io/rule-language/data-types.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.
