Text preview for : Mesa_Language_Manual_Version_4.0_May78.pdf part of xerox Mesa Language Manual Version 4.0 May78 xerox mesa 4.0_1978 Mesa_4_Documentation Mesa_Language_Manual_Version_4.0_May78.pdf



Back to : Mesa_Language_Manual_Vers | Home

Mesa Language Manual


by James G. Mitchell
William Maybury
Richard Sweet



Version 4.0
May 1978



Mesa is the language component of a programming system intended for developing and
maintaining a wide range of systems and applications programs. It includes facilities for
user-defined data types, strong compile-time type checking of both data types and program
interfaces, procedure and coroutine control mechanisms, control structures for dealing with
concurrency and exceptional conditions, and features designed to support the development of
systems composed of separate modules and to control information sharing among them.




XEROX
PALO ALTO RESEARCH CENTER
3333 Coyote Hill Road / Palo Alto / California 94304


SYSTEMS DEVELOPMENT DEPARTMENT
3408 Hillview Avenue / Palo Alto / California 94304




This document is for internal Xerox use only.
CONTENTS
CHAPTER 1. INTRODUCTION 1
1.1. Syntax notation 2
CHAPTER 2. BASIC DATA TYPES AND EXPRESSIONS 4
2.1. A slice of Mesa code 4
2.1.1. Basic lexical structure 5
2.2. Simple declarations 6
2.3. The fundamental operations, ... , =, and # 7
2.4. Basic types 7
2.4.1. T.he numeric types INTE.GER, LONG INTEGER and CARDINAL 7
2.4.1.1. Numeric literals 8
2.4.2. Type REAL 9
2.4.3. Type BOOLEAN 9
2.4.4. Type CHARACTER 10
2.4.5. Relations among basic types 10
2.5. Expressions 11
2.5.1. Numeric operators 12
2.5.1.1. The operator LONG 14
2.5.1.2. CHARACTER operators 15
2.5.2. Relational operators 15
2.5.3. BOOLEAN operators 16
2.5.4. Assignment expressions 17
2.6. Initializing variables in declarations 17
2.6.1. Compile-time constants 18
2.7. More general declarations 19
CHAPTER 3. COMMON CONSTRUCTED DATA TYPES 20
3.1. The element types 22
3.1.1. Enumerated types 22
3.1.2. Subrange types 24
3.1.2.1. Subranges of numeric types 26
3.1.2.2. Range Assertions 26
3.2. Arrays 27
3.2.1. Declaration of arrays 29
3.2.2. Constructors for arrays 30
3.3. Records 31
3.3.1. Field lists