User Tools

Site Tools


en:arrayelements

Differences

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

Link to this comparison view

Next revision
Previous revision
en:arrayelements [2020/04/23 15:33]
admin created
en:arrayelements [2020/04/23 15:39] (current)
admin
Line 10: Line 10:
  
 **array** [ [[integerexpressions|row]] , [[integerexpressions|column]] ] \\ **array** [ [[integerexpressions|row]] , [[integerexpressions|column]] ] \\
- 
  
 ==== Description ==== ==== Description ====
  
-By default an integer from 0 to one less than the length of an array is used to index values within an array.  This behavior can be modified with the arraybase statement.  You may specify either a zero (for default indexing) or 1 for indexing starting at 1 and going to the length of the array. +After you create an array, you can set and retrieve the values of the array using square braces containing integer index numbers.
- +
- +
-==== Example ==== +
-<code> +
-arraybase 1 +
-ar = {44,55,66,77,88} +
-for i = 1 to ar[?] +
-    ? i, ar[i] +
-next i +
-</code> +
- +
-<code> +
-1            44 +
-2            55 +
-3            66 +
-4            77 +
-5            88 +
-</code>+
  
 +By default the index is an integer from 0 to one less than the length of an array is used to index values within an array.  This behavior can be modified with the arraybase statement.
  
 ==== See Also ==== ==== See Also ====
 {{page>en:start#Arrays and Variables&noheader}} {{page>en:start#Arrays and Variables&noheader}}
en/arrayelements.1587677632.txt.gz · Last modified: 2020/04/23 15:33 by admin