Difference between revisions of "$DYNAMIC"

From QB64 Wiki
Jump to navigation Jump to search
imported>Clippy
m
imported>Clippy
m
Line 12: Line 12:
 
* In '''QB64''', REDIM {{KW|_PRESERVE}} can save previous array data.
 
* In '''QB64''', REDIM {{KW|_PRESERVE}} can save previous array data.
 
* Dynamic arrays can also be resized by the program user's input if desired.
 
* Dynamic arrays can also be resized by the program user's input if desired.
 
+
* [[$DYNAMIC|Dynamic]] arrays MUST be [[REDIM]]ensioned if [[ERASE]] or [[CLEAR]] are used to clear the array values.
  
  

Revision as of 00:00, 3 May 2011

The $DYNAMIC Metacommand allows the creation of dynamic(changeable) array sizes.


== Syntax == REM $DYNAMIC


  • Metacommands require a REM or apostrophy (') before them.
  • Metacommands should be placed at the program start in the main module.
  • Dynamic arrays can be resized using REDIM. The array's type cannot be changed.
  • All data in the array will be lost when redimensioned in QBasic.
  • In QB64, REDIM _PRESERVE can save previous array data.
  • Dynamic arrays can also be resized by the program user's input if desired.
  • Dynamic arrays MUST be REDIMensioned if ERASE or CLEAR are used to clear the array values.


See also:




Navigation:
Keyword Reference - Alphabetical
Keyword Reference - By Usage
Main Wiki Page