Skip to main content

array.len()

Returns an array’s length

Availability

Device + Agent

Returns

Integer — the number of items in the array

Description

This method returns the length of the array, ie. the number of items currently stored within it.

Example Code

// Constants for the alphanumeric character set
static charset = [
[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00], // Space - Ascii 32
[0x00,0x10,0x10,0x10,0x10,0x00,0x10,0x00], // !
[0x00,0x24,0x24,0x00,0x00,0x00,0x00,0x00], // "
...
[0xFF,0xFF,0xFF,0xFF,0x55,0xAA,0x55,0xAA],
[0xAA,0x55,0xAA,0x55,0xFF,0xFF,0xFF,0xFF],
[0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55] // Block Graphic 11
];
local numberOfChars = charset.len();