User Tools

Site Tools


en:lists

This is an old revision of the document!


Lists

A list is either a one dimensional set of values separated by commas and enclosed in braces { }, or a list if lists containing two dimensions of data.

You may use lists in many statements to define a collection of points or sounds. Lists are also used to quickly assign a variable to an array of values.

+—+—+

n anonymous array is a set of numeric values or a set of string values, separated by commas, and enclosed in braces {}. Anonymous array can be used to rapidly assign a group of values to an array. If the Anonymous array is longer than the dimensioned array then the array will be automatically re-dimensioned (Redim) to the correct length.

Anonymous Arrays can also be used in the Poly, Sound, and Stamp statements in place of an array variable.

Example

dim myarray(4)
myarray = {1, 2, 3, 4}

dim words(1)
words = {"how","now","brown","cow"}
for n = 0 to words[?]-1
 print words[n]
next n
en/lists.1470604792.txt.gz · Last modified: 2020/02/28 10:46 (external edit)