Information technology — Programming languages — Part 1: Modula-2, Base Language

Gives definition of the language Modula-2 and its standard library and specifications for symbols for Modula-2 program representation, lexical and syntactic structure and the semantics of Modula-2 programs, the interface to library modules, modules of the standard library, rules for use of the language, criteria for size and complexity of programs and requirements for implementation.

Technologies de l'information — Langages de programmation — Partie 1: Modula-2, langage de base

General Information

Status
Published
Publication Date
29-May-1996
Current Stage
9093 - International Standard confirmed
Start Date
24-Sep-2024
Completion Date
19-Apr-2025
Ref Project
Standard
ISO/IEC 10514-1:1996 - Information technology -- Programming languages
English language
707 pages
sale 15% off
Preview
sale 15% off
Preview

Standards Content (Sample)


INTERNATIONAL ISO/IEC
STANDARD 10514-I
First edition
1996-06-01
Information technology - Programming
languages -
Part 1:
Modula-2, Base Language
Technologies de I’informa tion - Langages de programmation -
Par-tie 7: Modula-2, langage de base
Reference number
&O/l EC 10514-I : 1996(E)
ISO/IEC 10514-l : 1996(E)
Contents Page
Foreword . xiv
Introduction . xv
Section1 : Scope . 1
1.1 Goals . 1
1.2 Specifications included in this part of ISO/IEC 10514 1
...................................
1.3 Specifications not within the scope of this part of ISO/IEC 10514. . 1
Section 2 : Normative References . 3
Section 3 : Definitions, Structure, and Conventions . 4
3.1 Definitions .
3.2 Structure of the Formal Definition 6
..................................................
.................................................................. 8
3.3 Conventions
3.3.1 Informative text . 8
3.3.2 Typographical conventions . 8
3.3.3 References to pervasive identifiers . 9
3.3.4 Interpretation of non-VDM-SL notations . 9
3.3.5 References to formal parameter names. .
Section 4 : Requirements for Implementations 10
..........................................
4.1
Translation. . 10
4.2 Source Code Representation 10
......................................................
4.3
Ordering of Declarations . 11
4.4 Predefined Entities . 11
4.5 Library Modules
............................................................... 11
4.6
Errors . 12
4.7 Exceptions .
4.8 Implementation-dependencies
..................................................... 13
4.9 Documentation. . 13
4.10 Statement of Compliance.
........................................................ 14
4.11 Minimum requirements
.......................................................... 14
@ ISO/IEC 1996
All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized in any form or by any
means, electronic or mechanical, including photocopying and microfilm, without permission in writing from the publisher.
ISO/IEC Copyright Office l Case Postale 56 l CH-1211 Geneve 20 l Switzerland
Printed in Switzerland
ii
ISO/IEC 10514-l: 1996(E)
@ ISO/IEC
Section 5 : The Lexis .
.......................................................... 16
5.1 Source Code Structure
5.2 Wordtokens .
5.2.1 Identifiers .
....................................................... 16
5.2.2 Portable Identifiers
.......................................................... 16
5.2.3 Full Identifiers
...................................................... 16
5.2.4 Pervasive Identifiers
5.2.5 Keywords .
.......................................................... 17
5.3 Symbols and Operators
........................................................ 17
5.3.1 Required Symbols
.................................................. 18
5.3.2 Symbols with alternatives
5.3.3 Operators .
..............................................................
5.4 Constant Literals
.................................................... 20
5.4.1 Whole Number Literals
............................................................ 20
5.4.2 Real Literals
.......................................................... 20
5.4.3 String Literals
...................................................................
5.5 Separators
............................................................
5.5.1 WhiteSpace
...........................................................
5.5.2 Comments.
.................................................... 21
Source Code Directives
5.5.3
...................................................
5.6 Letters and National Characters
Section 6 : The Language .
.................................... 23
6.1 Programs, Program Modules, and Separate Modules
.......................................... 23
6.1.1 Programs and Compilation Modules
........................................................ 27
6.1.2 Program Modules
....................................................... 28
6.1.3 Definition Modules
.................................................. 30
6.1.4 Implementation Modules.
.................................... 31
6.1.4.1 Sourced Implementation Modules
.................................... 33
6.1.4.2 Abstract Implementation Modules
............................... 34
6.1.5 Program Module and Separate Module Consistency
................. 34
6.1.5.1 Definition Module and Implementation Module Consistency
......................................... 36
6.1.5.2 Module Compilation Order
............................................. 37
6.1.5.3 Module Dependencies
................................................ 38
6.1.6 Module Initialization Order.
..................................................... 40
6.1.7 Program Termination
6.1.8 ImportLists .
..................................................... 43
6.1.8.1 Import List
.................................................. 43
6.1.8.2 Simple Imports
...............................................
6.1.8.3 Unqualified Import
.............................. 45
6.1.8.4 Import Consistency in Definition Modules
................................. 46
6.1.8.5 Import Consistency in Module Blocks
6.1.9 ExportLists .
.............................................. 46
6.1.9.1 Unqualified Exports
................................................ 47
6.1.9.2 Qualified Exports
................................................ 48
6.1.10 Implicit Import and Export
....................................................... 50
6.1.11 Protected Modules
...................................................... 52
6.2 Definitions and Declarations
.............................................................. 52
6.2.1 Identifiers
...................................................... 52
6.2.2 Qualified Identifiers
6.2.3 Definitions. .
......................................................... 56
6.2.4 Type Definitions
...................................................... 57
6.2.5 Procedure Headings
......................................... 58
6.2.5.1 Proper Procedure Headings
....................................... 60
6.2.5.2 Function Procedure Headings
............................................... 61
6.2.5.3 Formal Parameters
............................................................ 63
6.2.6 Declarations
. . .
ISO/IEC 10514-l: 1996(E) @ ISO/IEC
.................................
6.2.7 Ordering of Procedure and Module Declarations
....................................................
6.2.8 Constant Declarations.
....................................................... 68
6.2.9 Type Declarations
.....................................................
6.2.10 Variable Declarations
.................................................... 71
6.2.11 Procedure Declarations
...................................... 73
6.2.11 .l Proper Procedure Declarations
.....................................
6.2.11.2 Function Procedure Declarations
.................................................
6.2.12 Local Module Declarations
..........................................
6.2.13 Auxiliary Formal Model Definitions.
..................................... 82
6.2.13.1 Identifiers Defined in Definitions
...................................
6.2.13.2 Identifiers Declared in Declarations
..................................... 83
6.2.13.3 Identifiers Defined in New Types
............................... 84
6.2.13.4 Qualified Identifiers Used in Declarations
............................... 84
6.2.13.5 Qualified Identifiers used in Expressions.
................................... 87
6.2.13.6 Qualified Identifiers Used in Types
............................... 88
6.2.13.7 Qualified Identifiers Used in Parameters
.......................... 89
6.2.13.8 Shielded Environments and Shielded Identifiers
6.3 DataTypes .
..................................... 91
6.3.1 Type Denoters and Ordinal Type Denoters
......................................................... 92
6.3.2 Type Identifiers
6.3.3 New Types .
...................................................... 94
6.3.4 Enumeration Types
.........................................................
6.3.5 SubrangeTypes
6.3.6 Set Types .
6.3.7 Packedset Types .
...........................................................
6.3.8 Pointer Types
........................................................
6.3.9 ProcedureTypes
........................................... 101
Proper Procedure Types
6.3.9.1
......................................... 101
Function Procedure Types.
6.3.9.2
....................................... 102
6.3.9.3 Formal Parameter Type Lists
............................................ 103
6.3.9.4 Variable Formal Types
.............................................. 104
Value Formal Types
6.3.9.5
6.3.10 FormalTypes .
6.3.11 Array Types .
6.3.12
RecordTypes .
.................................................... 109
6.3.12.1 Fixed Fields
................................................... 109
6.3.12.2 Variant Fields
....................................................... 114
6.3.13
Storage Allocation
..............................
6.3.13.1 Allocating Storage for Constructed Types
............................... 115
6.3.13.2 Allocating Storage for Elementary Types
..................... 116
6.3.13.3 Allocating Storage for Structured (Composite) Types.
............................ 120
6.3.13.4 Allocating Storage for System Storage Types
............................................ 121
Expression and Assignment Compatibility
6.4
.................................................. 121
Expression Compatibility
6.4.1
..................................................
Assignment Compatibility
6.4.2
6.5 Blocks.l2 6
..................................................
6.5.1 Proper Procedure Blocks
.................................................
6.5.2 Function Procedure Blocks
.......................................................... 131
6.5.3 Module Blocks
................................................ 132
6.5.4 Static Module Initialization.
................................................. 135
6.5.5 Static Module Finalization
.............................................. 136
6.5.6 Dynamic Module Initialization
............................................... 138
6.5.7 Dynamic Module Finalization
......................................... 140
6.5.8 Block Bodies and Exception Handling
................................................ 142
6.5.8.1 Non-result Bodies
................................................... 144
6.5.8.2 Result Bodies
................................................................... 146
6.6 Statements
iv
ISO/IEC 10514-l: 1996(E)
@ ISO/IEC
.....................................................
6.6.1 Statement Sequences
.......................................................
6.6.2 Empty Statements
...................................................
6.6.3 Assignment Statements.
.........................................................
6.6.4 Procedure Calls
.......................................................
6.6.5 Return Statements
......................................... 154
6.6.5.1 Simple Return Statements.
......................................... 154
6.6.5.2 Function Return Statements
........................................................
6.6.6 Retry Statements
........................................................
6.6.7 With Statements
...........................................................
6.6.8 If Statements
........................................................ 159
6.6.9 Case Statements.
................................................
6.6.9.1 Case Alternatives
........................................................
While Statements
6.6.10
.......................................................
6.6.11 Repeat Statements
........................................................
6.6.12 Loop Statements
.........................................................
Exit Statements
6.6.13
.........................................................
6.6.14 For Statements.
..............................................
6.6.15 Well-formed Control Variables
....................................................
6.6.15.1 Threatening
...................................
...

Questions, Comments and Discussion

Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.