Difference between revisions of "$DYNAMIC"

From QB64 Wiki
Jump to navigation Jump to search
imported>Clippy
imported>Clippy
m (preserve)
Line 3: Line 3:
  
  
''Syntax:'' REM $DYNAMIC
+
{{PageSyntax}} REM $DYNAMIC
  
  
 
* Metacommands require a REM or apostrophy (') before them.
 
* Metacommands require a REM or apostrophy (') before them.
 
* Metacommands should be placed at the program start in the main module.
 
* 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.
+
* Dynamic arrays can be resized using {{KW|REDIM}}. The array's type cannot be changed.
* All data in the array will be lost when redimensioned.
+
* All data in the array will be lost when redimensioned in QBasic.
 +
* 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.
  
  
  
''See also:'' [[$STATIC]], [[DIM]]
+
''See also:''  
 +
* {{KW|$STATIC}}, {{KW|$INCLUDE}}
 +
* {{KW|DIM}}
  
  
  
  
==Navigation:==
+
{{PageNavigation}}
 
 
[[Keyword_Reference_-_Alphabetical|Go to Keyword Reference - Alphabetical]]
 
 
 
[[Keyword Reference - By usage|Go to Keyword Reference - By usage]]
 

Revision as of 20:21, 12 April 2010

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


== 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.


See also:




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