User Tools

Site Tools


en:lists

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
en:lists [2016/08/07 15:19]
admin
en:lists [2016/08/07 15:45]
admin
Line 1: Line 1:
 ===== Lists ===== ===== 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.+A list is either a one dimensional set of values separated by commas and enclosed in braces { }, or a list of 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.
  
-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.+The [[explode|Explode]] and [[explodex|Explodex]] functions also return a list that may be used wherever lists are allowed. 
 + 
 +==== Statements and Functions Where Lists May Be Used ==== 
 +[[Arrays|Arrays]], [[dim|Dim]], [[implode|Implode]], [[poly|Poly]], [[sound|Sound]], [[spritepoly|Spritepoly]], [[stamp|Stamp]]
  
-+---+---+ 
  
-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|Redim]]) to the correct length.\\ 
-\\ 
-Anonymous Arrays can also be used in the [[poly|Poly]], [[sound|Sound]], and [[stamp|Stamp]] statements in place of an array variable. 
 ==== Example ==== ==== Example ====
 <code> <code>
-dim myarray(4) 
-myarray = {1, 2, 3, 4} 
- 
-dim words(1) 
 words = {"how","now","brown","cow"} words = {"how","now","brown","cow"}
 for n = 0 to words[?]-1 for n = 0 to words[?]-1
  print words[n]  print words[n]
 next n next n
 +
 +sound {{200,200},{400,300},{200,200}}
 </code> </code>
 +
 +
 +==== History ==== 
 +|1.99.99.55|Added two dimensional lists|
  
en/lists.txt · Last modified: 2020/04/26 22:18 by admin