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 RTYPE

RTYPE

Spec.RTYPE History

Hide minor edits - Show changes to output

2010-05-24 12:53 by benjk -
Added lines 1-44:
[@BINDINGS FOR RTYPE; (* R-Type *)

(* Semantic Properties for Real Number Types *)


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

TYPE = OPAQUE RECORD := REAL;


(* Bindings permitted for R-Type ADTs *)

CONST [TMIN]; (* allow binding to TMIN function *)

CONST [TMAX]; (* allow binding to TMAX function *)

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 multiply operator *)

PROCEDURE [/]; (* allow binding to division operator *)

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

PROCEDURE [<]; (* allow binding to less operator *)

PROCEDURE [>]; (* allow binding to greater operator *)

PROCEDURE [TO]; (* allow scalar conversion primitive toSXF *)

PROCEDURE [FROM]; (* allow scalar conversion primitive fromSXF *)

END RTYPE.@]