This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
en:arrays [2016/08/07 15:37] admin |
en:arrays [2016/09/08 19:32] admin |
||
---|---|---|---|
Line 1: | Line 1: | ||
===== Arrays ===== | ===== Arrays ===== | ||
Arrays are allocated using the [[DIM|DIM]] command or re-sized using [[REDIM|REDIM]]. | Arrays are allocated using the [[DIM|DIM]] command or re-sized using [[REDIM|REDIM]]. | ||
- | Array sizes may also be extracted using [?] [?,] and [,?] on the end of the array variable. | + | [[arraylength|Array lengths]] |
==== Assigning values to an array ==== | ==== Assigning values to an array ==== | ||
- | Values may be assigned to an array in one of four ways: | + | Values may be assigned to an array in one of five ways: |
1. By using the [[dim|Dim]] statement to reserve space for the array in the computer' | 1. By using the [[dim|Dim]] statement to reserve space for the array in the computer' | ||
Line 18: | Line 18: | ||
< | < | ||
a = {{0, | a = {{0, | ||
+ | </ | ||
+ | or | ||
+ | < | ||
+ | b[] = {1,2,3,4} | ||
</ | </ | ||
Line 31: | Line 35: | ||
</ | </ | ||
+ | 5. Using the [[fill|fill]] assignment operator (with or without [[dim|dim]]) | ||
+ | < | ||
+ | dim c fill " | ||
+ | dim e[] fill 0 | ||
+ | b fill "" | ||
+ | a[] fill -1 | ||
+ | </ | ||
==== History ==== | ==== History ==== | ||
|1.99.99.55|added dim logic to copy one array to another| | |1.99.99.55|added dim logic to copy one array to another| | ||
+ | |1.99.99.57|added the fill assignment operator| |