Help Center
Help CenterFreeBASIC

Arraysizefunction

Provides the size of an array given its array-name.

Array Functionsfunctiondocumented

Syntax

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

Parameters

NameDescription
arraynameThe name of the array for which the size is returned.

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())

Version


  • Since fbc 1.09.0.

Differences from QB


  • New to FreeBASIC.

See also


Example


#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

Reference

  • Documented in KeyPgArraySize.html