> For the complete documentation index, see [llms.txt](https://guide.cronuszen.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.cronuszen.com/gpcscripting/gpc-script-guide/gpc-developer-guide/definitions.md).

# Definitions

The sole purpose of a definition is to assign a value to a word and therefore make a script easier for a human to read. They do not use any bytecode space in a script. When a script is compiled the words are changed to their assigned value.

### Syntax

```
define <n> = <value or expression>;
```

| Parameter               | Description                                      |
| ----------------------- | ------------------------------------------------ |
| `<n>`                   | The name of the constant                         |
| `<value or expression>` | The value or expression assigned to the constant |

The value of the definition must be possible to compute during compilation, meaning you can use math but not math functions.

Once a word is defined and given a value, that word can be used anywhere in the script where a value is valid, as shown below:

```gpc
define my_value = 50;

main {
    if(get_val(XB1_LT)) {
        set_val(XB1_RT, my_value);
    }
}
```

If you wish to assign a value to a word and change its value during run time, you would use a [variable](/gpcscripting/gpc-script-guide/gpc-developer-guide/variables.md) instead of a `define`.


---

# 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://guide.cronuszen.com/gpcscripting/gpc-script-guide/gpc-developer-guide/definitions.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.
