ERASE

From QB64 Phoenix Edition Wiki
Revision as of 16:57, 19 April 2022 by BigRon55 (talk | contribs) (Created page with "The ERASE statement is used to clear all data from an array. $STATIC array dimensions are not affected. {{PageSyntax}} : ERASE ''arrayName'' [, ''arrayName2''...] {{PageDescription}} * All string array elements become null strings ("") and all numerical array elements become 0. * Multiple arrays can be erased using commas between the array names. * Dynamic arrays must be REDIMensioned if they are referenced after erased. * Dimensi...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The ERASE statement is used to clear all data from an array. $STATIC array dimensions are not affected.


Syntax

ERASE arrayName [, arrayName2...]


Description

  • All string array elements become null strings ("") and all numerical array elements become 0.
  • Multiple arrays can be erased using commas between the array names.
  • Dynamic arrays must be REDIMensioned if they are referenced after erased.
  • Dimension subprocedure arrays as STATIC to use ERASE and not have to REDIM.
  • You do not have to include array brackets in an ERASE call.


See also



Navigation:
Main Page with Articles and Tutorials
Keyword Reference - Alphabetical
Keyword Reference - By usage
Report a broken link