Array: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
Array(''expressionlist'') | |||
== Description == | |||
ARRAY creates an array dynamically. The required parameter, ''expressionlist'', is a comma-delimited list of valid expressions. The resulting array has a length equal to the number of elements in ''expressionlist''. Arrays created with ARRAY have a lower bound of 0. | ARRAY creates an array dynamically. The required parameter, ''expressionlist'', is a comma-delimited list of valid expressions. The resulting array has a length equal to the number of elements in ''expressionlist''. Arrays created with ARRAY have a lower bound of 0. | ||
== Example == | |||
<pre> | <pre> | ||
REM | REM Array Example | ||
' | 'Array creates an array dynamically | ||
DIM MyArray, Message | DIM MyArray, Message | ||
'Create an array with 2 string elements | 'Create an array with 2 string elements | ||
Line 25: | Line 25: | ||
[[dim|DIM]] | [[dim|DIM]] | ||
[[Category:Language Reference]] |
Revision as of 20:14, 8 August 2012
Array(expressionlist)
Description
ARRAY creates an array dynamically. The required parameter, expressionlist, is a comma-delimited list of valid expressions. The resulting array has a length equal to the number of elements in expressionlist. Arrays created with ARRAY have a lower bound of 0.
Example
REM Array Example 'Array creates an array dynamically DIM MyArray, Message 'Create an array with 2 string elements MyArray = Array("Hello", "World!") 'Access the array and concatenate elements PRINT MyArray(0) & " " & MyArray(1)
Output
Hello World!
Related Items