Skip to content

Spec #38.6: Implement implicit array allocation #61

Description

@treytomes

Description

ECMA-55 auto-allocates arrays on first reference without explicit DIM. Default bounds are BASE to 10.

ECMA-55 References

  • ECMA55-ARR-010: Implicit array allocation
  • ECMA55-ARR-011: Default bounds are 0-10 or 1-10 based on BASE

Acceptance Criteria

  • First access to undeclared array allocates it
  • Default bounds: BASE to 10
  • Respects current OPTION BASE setting
  • Works for both 1D and 2D arrays
  • Subscripts must fit within default range
  • Mix of explicit DIM and implicit allocation works
  • All tests pass
  • Test coverage ≥ 80%

Parent Issue

Part of #38 - Implement DIM and OPTION BASE for array support

Estimated Effort

2-3 hours

Dependencies

Depends on Spec #38.5 (2D array support)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ecma-55ECMA-55 Minimal BASIC specification complianceenhancementNew feature or request

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions