PureBasic - Array

Overview

Arrays are structures to store indexed elements. Unlike a list or a map, the elements are allocated in a contiguous manner in memory. Therefore, it's not possible to easily insert or remove an element. On other hand, it provides a very fast direct access to a random element.

To work with Arrays, they have to be declared first. This could be done with the keyword Dim.

Arrays can be sorted using SortArray() or SortStructuredArray(), and can also be randomized using RandomizeArray().

Command Index

ArraySize
CopyArray
FreeArray

Example

Array.pb

Supported OS

All

Reference Manual - Index