Array: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
Brendon (talk | contribs)
No edit summary
Brendon (talk | contribs)
No edit summary
Line 8: Line 8:


<pre>
<pre>
REM Array Example
Rem Array Example
'Array creates an array dynamically
'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
MyArray = Array("Hello", "World!")
MyArray = Array("Hello", "World!")
'Access the array and concatenate elements
'Access the array and concatenate elements
PRINT MyArray(0) & " " & MyArray(1)
Print MyArray(0) & " " & MyArray(1)
</pre>
</pre>


Line 25: Line 25:
== Related Items ==
== Related Items ==


[[dim|DIM]]
[[dim|Dim]]


[[Category:Language Reference]]
[[Category:Language Reference]]

Revision as of 00:16, 24 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

Dim