Anonymous user
Creating an Array: Difference between revisions
→{{header|BASIC}}: Dimension given is the upper bound.
(Task description: initialize array with data.) |
(→{{header|BASIC}}: Dimension given is the upper bound.) |
||
Line 169:
{{works with|PB|7.1}}
The default array base (lower bound) can be set with OPTION BASE. If OPTION BASE is not set, the base may be either 0 or 1, depending on implementation. The value given in DIM statement is the
<lang qbasic> OPTION BASE 1
DIM myArray(100) AS INTEGER </lang>
Alternatively, the
<lang qbasic> DIM myArray(-10 TO 10) AS INTEGER </lang>
|