Modula-2 Reloaded

A Modern Typesafe & Literate Programming Notation

Site Menu

Project

Specification

Implementation

Recommendations

Reference

Needs Updating

Work in Progress

Wastebasket

Wiki Manual

edit SideBar

Array Type

BINDINGS FOR ArrayType;

(* Semantic Properties for Static Array Types *)


(* ADTs must be opaque records,
   no literals may be used *)

TYPE = OPAQUE RECORD;


(* Bindings permitted for ArrayType ADTs *)

PROCEDURE [.]; (* allow accessor binding to [ ] operator *)

PROCEDURE [!]; (* allow mutator binding to [ ] operator *)

PROCEDURE [COUNT]; (* allow binding to COUNT function *)

PROCEDURE [FOR]; (* allow binding to FOR .. IN iterator *)

PROCEDURE [=]; (* allow binding to equal operator *)

END ArrayType.