Difference between revisions of "OPTION BASE"

From QB64 Wiki
Jump to navigation Jump to search
imported>Clippy
Line 1: Line 1:
 
'''OPTION BASE 1''' is used to set the lowest array element to 1.
 
'''OPTION BASE 1''' is used to set the lowest array element to 1.
  
Otherwise, arrays will be dimensioned from element 0 if you DIM just the upper bounds.
 
  
It should be set before any arrays are dimensioned ([[DIM]]).
+
 
 +
* Otherwise, arrays will be dimensioned from element 0 if you DIM just the upper bounds.
 +
* Statement should be set before any arrays are dimensioned ([[DIM]]).
 +
 
 +
 
  
 
''Alternative:'' DIM arrays using upper and lower bounds as shown:
 
''Alternative:'' DIM arrays using upper and lower bounds as shown:
  
DIM Array(1 TO 200)
+
: DIM Array(1 TO 200)
 +
 
 +
 
 +
''See also:'' [[UBOUND]], [[LBOUND]]
 +
 
 +
 
 +
 
 +
==Navigation:==
  
 +
[[Keyword_Reference_-_Alphabetical|Go to Keyword Reference - Alphabetical]]
  
''See also:'' [[UBOUND]] [[LBOUND]]
+
[[Keyword Reference - By usage|Go to Keyword Reference - By usage]]

Revision as of 19:42, 7 September 2009

OPTION BASE 1 is used to set the lowest array element to 1.


  • Otherwise, arrays will be dimensioned from element 0 if you DIM just the upper bounds.
  • Statement should be set before any arrays are dimensioned (DIM).


Alternative: DIM arrays using upper and lower bounds as shown:

DIM Array(1 TO 200)


See also: UBOUND, LBOUND


Navigation:

Go to Keyword Reference - Alphabetical

Go to Keyword Reference - By usage