Array

Add values to an Array variable

Syntax 
       Array (el1,el2,el3)

Key
   el1,2,..  Values (Elements) to add to the array
             At least one element must be supplied

Examples

Create an array with 4 items:

Dim vaVolcanoes
vaVolcanoes=Array("Cinder cone","Composite","Shield volcano","Lava dome")

Alternatively define 4 individual elements:

Dim vaVolcanoes(3)
vaVolcanoes(0)="Cinder cone"
vaVolcanoes(1)="Composite"
vaVolcanoes(2)="Shield volcano"
vaVolcanoes(3)="Lava dome"

“Listen to many, speak to a few” ~ William Shakespeare

Related:

Dim - Declare a new variable or array variable.
Filter - Produce an array by filtering an existing array.
Equivalent in PowerShell: Arrays


 
Copyright © 1999-2024 SS64.com
Some rights reserved