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

Spec VTYPE

VTYPE

BINDINGS FOR VTYPE; (* V-Type *)

(* Semantic Properties for Vector Types *)


(* ADTs must be transparent records,
   structured literals will be used by default *)

TYPE = RECORD;


(* Bindings permitted for V-Type ADTs *)

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

PROCEDURE [::]; (* allow binding to conversion operator *)

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

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

PROCEDURE [+]; (* allow binding to plus operator *)

PROCEDURE [-]; (* allow binding to minus operator *)

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

END VTYPE.