Skip to content

Arraysize

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

Home › Array Functions › Arraysize

Arraysize

Returns the total size of an array's elements in bytes.

Syntax

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

Parameters

  • arrayname

Description

Returns the total size (in bytes) of the array specified by arrayname() (size of array element multiplied by total number of array elements).

Remarks

Usage

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

using FB

...

result = ArraySize(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_size

array_size = ArraySize(array())

Print array_size                 '' 240

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