Lectures Modula-2

Lectures Modula-2 - MODULA-2 The design is centered on the...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
MODULA-2 The design is centered on the modularity and abstraction of the “ module unit, which aids in the design of reliable , cost-effective , large , and complex software systems. The modular facility provides for software partitioning into logical units, each with well defined interface that is separate from the implementation part. The language combines some low level facilities , in addition to the high level modular abstraction. Very PASCAL like (after all, the same designer, Wirth 1980), but with the followings: 1) No “go to”! and the language is case sensitive. 2) Only 40 reserved words, but there are 30 user predefined “standard identifiers” (Yakii!!): INTEGER, REAL, BOLLEAN, CHAR, TRUE, FALSE, NIL, ABS, MAX, MIN,… 3) No need for the statement grouping via the compound statements, every structuring statement has its own delimiters, e.g., IF …ELSEIF… END, FOR …… END. 4) The declaration of type “PROC” only for system procedures, where we can declare variables of type “PROC” and assign to it “sin”& “cos” system functions. First try into treating functions as “first class citizens” 5) Low level facilities, system calls: “WAIT” and “SIGNAL” that are used for mutual exclusion facilities to guard “critical” sections of codes that are shared among “concurrent” processes. 6) New types: “PROC”, LONGINT, CARDINAL (unsigned int), LONGREAL, BITSET, WORD (matching “any” type of word size), ARRAY OF WORD (for structure “any” multiple word size), ADDRESS (actual memory address, un-typed) which is compatible with any pointer type. Also, low level functions such as: TSIZE(type) that return the size of the type, at different hardwares, HIGH(item) that returns how many words in the item. In addition, it defines “literal constants”: OCTAL- 177 B , Hex- 7F99 H , Char-101 C (=A), 7 C (Bell). “BITSET” built in set type:
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
VAR A: ARRAY [1. .16] of BITSET;
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 5

Lectures Modula-2 - MODULA-2 The design is centered on the...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online