> For the complete documentation index, see [llms.txt](https://docs.hex-rays.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hex-rays.com/ida-9.3/ida-actions/makearray.md).

# MakeArray

## Description

Convert to array. This command allows you to create arrays and change their sizes.

The arrays are created in 2 simple steps:

1. Create the first element of array using the data definition commands (data, string, structs)
2. Apply the array command to the created data item. Enter array size in current array elements (not bytes). The suggested array size is the minimum of the following values:

* the address of the next item with a cross reference
* the address of the next user-defined name For string literals, you can use this command to change the length of the string.

The dialog box contains the following fields:

* **Items on a line** (meaningless for string literals):
  * **0** - place maximal number of items on a line
  * **other value** - number of items on a line Please note that the margin parameter affects the number of items on a line too.
* **Alignment** (meaningless for string literals):
  * **-1** - do not align items
  * **0** - align automatically
  * **other value** - width of each item
* **Signed elements**: if checked, IDA treats all elements as signed numbers. Only meaningful for numbers (not for offsets and segments and strings)
* **Display indexes**: if checked, IDA will display the indexes of array elements in the form of comments (0,1,2...)
* **Create as array**: if not checked, IDA will create a separate item for each array element. Useful for creating huge arrays. If the box is unchecked when this command is applied to string literals, IDA will create many string literals instead of one big string.

If applied to a variable-sized structure, this command is used to specify the overall size of the structure. You cannot create arrays of variable-sized structures.


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.hex-rays.com/ida-9.3/ida-actions/makearray.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
