This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
en:lists [2016/08/07 15:19] admin |
en:lists [2020/04/26 22:18] (current) admin |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Lists ===== | + | ===== Array List - 1 and 2 Dimensional Values |
- | 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. | + | An Array List is either a one dimensional set of values separated by commas and enclosed in braces { }, or a list of Array Lists containing two dimensions of data. You may use Array Lists in many statements that are expecting arrays and can be used to create arrays without the dim statement. |
- | You may use lists in many statements to define a collection of points or sounds. | + | The [[explode|Explode]] and [[explodex|Explodex]] functions also return a list that may be used wherever |
- | +---+---+ | ||
- | |||
- | 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. | ||
- | \\ | ||
- | Anonymous Arrays can also be used in the [[poly|Poly]], | ||
==== Example ==== | ==== Example ==== | ||
< | < | ||
- | dim myarray(4) | ||
- | myarray = {1, 2, 3, 4} | ||
- | |||
- | dim words(1) | ||
words = {" | words = {" | ||
for n = 0 to words[?]-1 | for n = 0 to words[?]-1 | ||
print words[n] | print words[n] | ||
next n | next n | ||
+ | |||
+ | sound {{200, | ||
</ | </ | ||
+ | |||
+ | |||
+ | ==== History ==== | ||
+ | |1.99.99.55|Added two dimensional lists| | ||
+ | |2.0.0.0|Clarified Difference between List of Values (Array) and [[maplist|Map List - Keys and Values]]| | ||