Skip to content

Util

std:util provides utility functions that are commonly used in Extron programs.

Functions

length ( array | string )

Returns the length of the given array or string.

import "std:util";
 
const arr = [1, 2, 3, 4, 5];
print(length(arr));
 
Console 
5

input ( prompt: string )

Prompts the user for input and returns the entered value.

import "std:util";
 
let name = input("Enter your name: ");
print(name);
 
Console 
Enter your name: John 
John 

sleep ( milliseconds: number )

Pauses the program for the given number of milliseconds.

import "std:util";
 
print("Hello");
sleep(1000);
print("World");
 
Console 
Hello 
World