Ugrás a fő tartalomhoz
Verzió: 17

ARRAY_COUNT

Counts the items in an array.

Description

Counts how many items are stored in an array. The result of the counting will be saved in a variable.

Syntax

ARRAY_COUNT [Array name] [Result variable]

Command parameters

Command parameterAssignmentValue formatInput options
Array nameRequiredStringLocal, variable
Result variableRequiredStringLocal, variable

Array name:

Name of the array.

Result variable:

Name of the variable that will store the result of the counting.

Sample code

Command only:

ARRAY_COUNT Data Data_Count

With added prerequisites: (array creation and fill)

ARRAY_CREATE Data

ARRAY_ADD Data Value1
ARRAY_ADD Data Value2
ARRAY_ADD Data Value3

ARRAY_COUNT Data Data_Count