Skip to content

Arraylen

Paul Squires edited this page Oct 19, 2026 · 3 revisions

Home › Array Functions › Arraylen

Arraylen

Returns the total number of elements in an array, counting every dimension.

Syntax

Declare Function ArrayLen ( arrayname() As Const Any ) As UInteger

Parameters

  • arrayname

Description

Returns the total number of elements of the array specified by arrayname() (taking into account all dimensions of array).

Remarks

Usage

#include once "fbc-int/array.bi"

using FB

...

result = ArrayLen(arrayname())

Differences from QB

  • New to FreeBASIC.

See also

Examples

#include Once "fbc-int/array.bi"

Using FB

Dim As LongInt array(4, 5)

Dim As UInteger array_length

array_length = ArrayLen(array())

Print array_length                '' 30

Category: Array Functions
Kind: function


Reproduced from the FreeBASIC Wiki Manual under the GNU Free Documentation License 1.3 — with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. Copyright © the FreeBASIC project and wiki contributors. See License.

Clone this wiki locally