Skip to content
Andrew Owen edited this page May 25, 2023 · 1 revision

DIM


DIM name {(|[} limit_0 [, limit_1] ... {)|]}

Allocates memory for arrays. The DIM statement also fixes the number of indices of the array. Unlike Microsoft BASIC, an array can be reallocated.

Parameters

  • name is a legal variable name specifying the array to be allocated.
  • limit_0, limit_1, ... are numeric expressions that specify the greatest index allowed at that position.

Notes

The size of arrays is limited by the available BASIC memory.

Errors

  • An index is empty: Syntax error.
  • An index is missing at the end: Missing operand.
  • limit_0, limit_1, ... have a string value: Type mismatch.
  • limit_0, limit_1, ... are not within [-32768 to 32767]: Overflow.
  • limit_0, limit_1, ... are negative: Illegal function call.
  • The array exceeds the size of available variable space: Out of memory.

Welcome to the SE BASIC wiki


  • Press RETURN to return to this menu.
  • Enter the name of a TOPIC to display it.
  • Enter EXIT to return to BASIC.

Choose from the following topics:

  1. Quick start guide: QUICK
  2. User's guide: USER
  3. Configuration guide: CONFIG
  4. Language guide: LANGUAGE
  5. Language reference: BASIC
  6. Technical reference: TECH
  7. Developer's guide: DEV
  8. Acknowledgemets: CREDITS
  9. Licenses: LICENSE
Clone this wiki locally