# Macros

Macros are commands within the code that allow for customization of the Lua++ compiler’s behavior. To use a macro one would use the `--!` prefix followed by the name of the macro. These macros must be the first statement of the program. Otherwise, the compiler will throw an error. Here are some examples:

```lua
--!<macro>
print("hello")
```

The following segment will not compile successfully as there is a statement preceding the macro definition:

```lua
local v = 1 -- NO
--!<macro>
print("hello")
```


---

# 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.luaplusplus.org/language-improvements/macros.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.
