This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
en:dim [2016/08/07 15:05] admin |
en:dim [2016/11/07 06:57] admin |
||
---|---|---|---|
Line 3: | Line 3: | ||
==== Format ==== | ==== Format ==== | ||
- | **dim** // | + | === Create a One Dimensional Array === |
- | **dim** // | + | |
- | **dim** // | + | |
- | **dim** // | + | |
- | **dim** // | + | |
- | **dim** // | + | |
- | **dim** // | + | |
+ | **dim** [[variables|variable]] ( [[integerexpressions|array_size]] )\\ | ||
+ | **dim** [[variables|variable]] ( [[integerexpressions|array_size]] ) **fill** [[expressions|expression]]\\ | ||
+ | **dim** [[variables|variable]] [ [[integerexpressions|array_size]] ]\\ | ||
+ | **dim** [[variables|variable]] [ [[integerexpressions|array_size]] ] **fill** [[expressions|expression]] | ||
+ | === Create a Two Dimensional Array === | ||
+ | |||
+ | **dim** [[variables|variable]] ( [[integerexpressions|array_size_rows]] , [[integerexpressions|array_size_columns]])\\ | ||
+ | **dim** [[variables|variable]] ( [[integerexpressions|array_size_rows]] , [[integerexpressions|array_size_columns]]) **fill** [[expressions|expression]]\\ | ||
+ | **dim** [[variables|variable]] [ [[integerexpressions|array_size_rows]] , [[integerexpressions|array_size_columns]]]\\ | ||
+ | **dim** [[variables|variable]] [ [[integerexpressions|array_size_rows]] , [[integerexpressions|array_size_columns]]] **fill** [[expressions|expression]] | ||
+ | === Use a List to Create and Fill an Array === | ||
+ | |||
+ | **dim** [[variables|variable]] = [[Lists|{ list ... }]]\\ | ||
+ | **dim** [[variables|variable]][] = [[Lists|{ list ... }]]\\ | ||
+ | **dim** [[variables|variable]] = [[Lists|{ { list ... }, { list ... } ... }]]\\ | ||
+ | **dim** [[variables|variable]][] = [[Lists|{ { list ... }, { list ... } ... }]] | ||
+ | |||
+ | === Copy One Array to Another === | ||
+ | |||
+ | **dim** [[variables|variable]] = [[variables|variable]][]\\ | ||
+ | **dim** [[variables|variable]][] = [[variables|variable]][] | ||
+ | |||
+ | === Fill an Existing Array With a Single Value === | ||
+ | |||
+ | **dim** [[variables|variable]] **fill** [[expressions|expression]]\\ | ||
+ | **dim** [[variables|variable]][] **fill** [[expressions|expression]] | ||
==== Description ==== | ==== Description ==== | ||
- | Returns a newly created single dimensional array of length //integer// or a 2 dimensional array that can be addressed by //row// and // | + | Returns a newly created single dimensional array of length //integer// or a 2 dimensional array that can be addressed by //row// and //column//. By default the elements in the array are left uninitialized (empty), You may add the fill option to fill all elements with a single value.\\ |
The first element of an array has an index of 0 (zero). | The first element of an array has an index of 0 (zero). | ||
Line 51: | Line 71: | ||
==== History ==== | ==== History ==== | ||
|1.99.99.55|Cleaned up documentation and added array copy.| | |1.99.99.55|Cleaned up documentation and added array copy.| | ||
+ | |1.99.99.56|Added fill clause| | ||
+ | |1.99.99.57|Added additional fill options| | ||
+ | |1.99.99.72|added the [] when setting one array from another| | ||
+ |