> ## Documentation Index
> Fetch the complete documentation index at: https://vulhunt-docs.binarly.io/llms.txt
> Use this file to discover all available pages before exploring further.

# AnnotateVariable

The `AnnotateVariable` object is used to create an annotation for a variable at a specific location in the decompiled code.

### Fields

| Field         | Description               | Type                                                     |
| :------------ | :------------------------ | :------------------------------------------------------- |
| `position`    | Variable position         | `string`                                                 |
| `index`       | Variable index            | `number`                                                 |
| `declaration` | Variable declaration      | `string`                                                 |
| `location`    | Address of the assignment | [`AddressValue`](/vulhunt-reference/types/address-value) |

### Reference

#### position

The position of the variable. Only `"global"`, `"input"`, or `"output"` is currently valid.

#### index

The index of the variable. Only `0` is currently valid.

#### declaration

The variable declaration as a string.

#### location

The address ([`AddressValue`](/vulhunt-reference/types/address-value)) of the assignment.

### Example

```lua theme={null}
evidence = {
  functions = {
    [context.caller.address] = {
      annotate:variable{
        position = "output",
        index = 0,
        declaration = "int result",
        location = <AddressValue>
      }
    }
  }
}
```
