ANSI ISO IEC 10206-1991 Information technology - Programming languages - Extended Pascal (Adopted by INCITS)《信息技术.程序设计语言.INCITS采纳的扩展Pascal语言》.pdf

上传人:syndromehi216 文档编号:437139 上传时间:2018-11-14 格式:PDF 页数:226 大小:10.82MB
下载 相关 举报
ANSI ISO IEC 10206-1991 Information technology - Programming languages - Extended Pascal (Adopted by INCITS)《信息技术.程序设计语言.INCITS采纳的扩展Pascal语言》.pdf_第1页
第1页 / 共226页
ANSI ISO IEC 10206-1991 Information technology - Programming languages - Extended Pascal (Adopted by INCITS)《信息技术.程序设计语言.INCITS采纳的扩展Pascal语言》.pdf_第2页
第2页 / 共226页
ANSI ISO IEC 10206-1991 Information technology - Programming languages - Extended Pascal (Adopted by INCITS)《信息技术.程序设计语言.INCITS采纳的扩展Pascal语言》.pdf_第3页
第3页 / 共226页
ANSI ISO IEC 10206-1991 Information technology - Programming languages - Extended Pascal (Adopted by INCITS)《信息技术.程序设计语言.INCITS采纳的扩展Pascal语言》.pdf_第4页
第4页 / 共226页
ANSI ISO IEC 10206-1991 Information technology - Programming languages - Extended Pascal (Adopted by INCITS)《信息技术.程序设计语言.INCITS采纳的扩展Pascal语言》.pdf_第5页
第5页 / 共226页
亲,该文档总共226页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述

1、INTERNATIONAL STANDARD ISOAEC 10206 First edition 1991-04-15 Information technology - Programming languages - Extended Pascal Langages de programmation - Pascal Btendu Reference number ISO/IEC 10206 : 1991 (E) Adopted by INCITS (InterNational Committee for Information Technology Standards) as an Ame

2、rican National Standard.Date of ANSI Approval: 1/11/99Published by American National Standards Institute,25 West 43rd Street, New York, New York 10036Copyright 2002 by Information Technology Industry Council (ITI).All rights reserved.These materials are subject to copyright claims of International S

3、tandardization Organization (ISO), InternationalElectrotechnical Commission (IEC), American National Standards Institute (ANSI), and Information Technology Industry Council(ITI). Not for resale. No part of this publication may be reproduced in any form, including an electronic retrieval system, with

4、outthe prior written permission of ITI. All requests pertaining to this standard should be submitted to ITI, 1250 Eye Street NW,Washington, DC 20005.Printed in the United States of AmericaISOAEC 10206 : 1991(E) Contents Page Introduction . 1 Scope 2 Normative reference 3 Definitions 3.1 Dynamic-viol

5、ation. 3.2 Error 3.3 Extension 3.4 Implementation-defined 3.5 Implementation-dependent . 3.6 Processor 4 Definitional conventions 5 Compliance . 5.1 Processors 5.2 Programs 6 Requirements 6.1 Lexicaltokens 6.1.1 General 6.1.2 Special-symbols. 6.1.3 Identifiers 6.1.4 Remote-directives . 6.1.5 Interfa

6、ce-directives 6.1.6 Implementation-directives 6.1.7 Numbers 6.1.8 Labels . vi 1 1 2 5 5 5 6 6 6 7 7 7 8 0 ISO/IEC 1991 All rights reserved. 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 p

7、ermission in writing from the publisher. ISO/IEC Copyright Office K Case postale 56 K CH-1211 Geneve 20 K Switzerland Printed in Switzerland ii ISO/IEC 10206 : 1991 (E) 6.1.9 Character-strings. . 6.1.10 Token separators 6.1.11 Lexical alternatives . 6.2 Blocks, scopes, activations, and states 6.2.1

8、Blocks . 6.2.2 Scopes . 6.2.3 Activations. 6.2.4 States . 6.3 Constants 6.3.1 General 6.3.2 Example of a constant-definition-part 6.4 Types and schemata. . 6.4.1 Type-definitions 6.4.2 Simple-types . 6.4.3 Structured-types 6.4.4 Pointer-types . 6.4.5 Compatible types . 6.4.6 Assignment-compatibility

9、 6.4.7 Schema-definitions 6.4.8 Discriminated-schemata. . 6.4.9 Type-inquiry . 6.4.10 Example of a type-definition-part 6.5 Declarations and denotations of variables . 6.5.1 Variable-declarations 6.5.2 Entire-variables . 6.5.3 Component-variables 6.5.4 Identified-variables 6.5.5 Buffer-variables 6.5

10、.6 Substring-variables 6.6 Initial states 6.7 Procedure and function declarations . 6.7.1 Procedure-declarations 6.7.2 Function-declarations . 6.7.3 Parameters . 6.7.4 Required procedures and functions 6.7.5 Required procedures. 6.7.6 Required functions 6.8 Expressions . 6.8.1 General 6.8.2 Constant

11、-expressions . . . . 8 9 . . . . 9 . . 10 . . . . 10 . . . . 10 13 . . . . 15 . . . . 16 . . . . 16 . . . . 17 . . . 17 . . . . 17 . . . . 19 ., 24 . . . . 32 . . . . 33 . . . . 33 . . . . 34 . . . . 35 . . . . 36 . . 36 . 38 . . . . 38 . . . . 39 . . . 39 . . . . 41 . . . . 41 . . . . 42 . . . . 42

12、 . . . 43 I 43 . . . . 45 . . . . 48 . . . . 56 . 56 . . . . 63 . . 69 . . . . 69 . . . . . 71 . . . 111 ISO/IEC 10206 : 1991 (E) 6.8.3 Operators . 6.8.4 Schema-discriminants 6.8.5 Function-designators . 6.8.6 Function-accesses 6.8.7 Structured-value-constructors. . 6.8.8 Constant-accesses 6.9 State

13、ments . 6.9.1 General . 6.9.2 Simple-statements 6.9.3 Structured-statements 6.9.4 Threats . 6.10 Inputandoutput . 6.10.1 The procedure read. 6.10.2 The procedure readln . 6.10.3 The procedure write 6.10.4 The procedure writeln 6.10.5 Theprocedurepage 6.11 Modules 6.11.1 Module-declarations. . 6.11.2

14、 Export-part . 6.11.3 Import-specifications . 6.11.4 Required interfaces. 6.11.5 Example of a module . 6.11.6 Examples of program-components that are module- declarations . 6.11.7 Example of exporting a range of enumerated-type values . 6.12 Main-program-declarations 6.13 Programs . 71 75 76 76 78 8

15、0 82 82 82 84 90 91 91 92 93 96 97 97 97 99 100 102 102 104 111 112 114 Annexes AnnexA Collectedsyntax 116 Annex B Incompatibilities with Pascal standards 176 Annex C Required identifiers . 177 Annex D Errors and dynamic-violations. . 178 Annex E Implementation-defined features. . 186 Annex F Implem

16、entation-dependent features . 189 AnnexG Bibliography . 191 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 iv ISO/IEC 10206 : 1991(E) Foreword IS0 (the International Organization for Standardization) and IEC (

17、the International Electrotechnical Commission) form the specialized system for worldwide standardiz- ation. National bodies that are members of IS0 or IEC participate in the development of International Standards through technical committees established by the respective organization to deal with pa

18、rticular fields of technical activity. IS0 and IEC technical committees collaborate in fields of mutual interest. Other international organizations, governmental and non-governmental, in liaison with IS0 and IEC, also take part in the work. In the field of information technology, IS0 and IEC have es

19、tablished a joint technical committee, ISO/IEC JTC 1. Draft International Standards adopted by the joint technical committee are circulated to national bodies for voting. Publication as an International Standard requires approval by at least 75 % of the national bodies casting a vote. International

20、Standard ISO/IEC 10206 was prepared by Joint Technical Committee ISO/IEC JTC 1, Information technology. Annexes A to G are for information only. ISO/IEC 10206 : 1991 (E) Introduction This International Standard provides an unambiguous and machine independent definition of the programming language Ex

21、tended Pascal. Its purpose is to facilitate portability of Extended Pascal programs for use on a wide variety of data processing systems. Language history The computer programming language Pascal was designed by Professor Niklaus Wirth to satisfy two principal aims a) to make available a language su

22、itable for teaching programming as a systematic discipline based on certain fundamental concepts clearly and naturally reflected by the language; b) to define a language whose implementations could be reliable and efficient on then-available computers. However, it has become apparent that Pascal has

23、 attributes that go far beyond those original goals. It is now being increasingly used commercially in the writing of system and application software. With this increased use, there has been an increased demand for and availability of extensions to IS0 7 185: 1983, Programming languages - PASCAL. Pr

24、ograms using such extensions attain the benefits of the extended features at the cost of portability with standard Pascal and with other processors supporting different sets of extensions. In the absence of a standard for an extended language, these processors have become increasingly incompatible.

25、This International Standard is primarily a consequence of the growing commercial interest in Pascal and the need to promote the portability of Pascal programs between data processing systems. Project history In 1977, a working group was formed within the British Standards Institution (BSI) to produc

26、e a standard for the programming language Pascal. This group produced several working drafts, the first draft for public comment being widely published early in 1979. In 1978, BSIs proposal that Pascal be added to ISOs programme of work was accepted, and the IS0 Pascal Working Group (then designated

27、 ISO/TC97/SC5/WG4) was formed in 1979. The Pascal standard was to be published by BSI on behalf of ISO, and this British Standard referenced by the International Standard. In the USA, in the fall of 1978, application was made to the IEEE Standards Board by the IEEE Computer Society to authorize proj

28、ect 770 (Pascal). After approval, the first meeting was held in January 1979. In December 1978, X3J9 convened as a result of a SPARC (Standards Planning and Requirements Committee) resolution to form a US TAG (Technical Advisory Group) for the IS0 Pascal standardization effort initiated by the UK. T

29、hese efforts were performed under X3 project 317. In agreement with IEEE representatives, in February 1979, an X3 resolution combined the X3J9 and P770 committees into a single committee called the Joint X3J9/IEEE P770 Pascal Standards Committee. (Throughout, the term JPC refers to this committee.)

30、The first meeting as JPC was held in April 1979. The resolution to form JPC clarified the dual function of the single joint committee to produce a dpANS and a proposed IEEE Pascal standard, identical in content. ANSI/IEEE77OX3.97-1983, American National Standard Pascal Computer Programming Language,

31、 was approved by the IEEE Standards Board on September 17, 1981, and by the American National Standards Institute on December 16, 1982. British Standard BS6192, Specification for Computer programming language Pascal, was published in 1982, and International Standard 7185 (incorporating BS6192 by ref

32、erence) was approved by IS0 on December 1,1983. Differences between the ANSI and IS0 standards are detailed in the Foreword of ANSI/IEEE770X3.97-1983. (BS6192/iS07185 was revised and corrected during 1988/89; it is expected that ANSIfiEEE770X3.97-1983 will be replaced by the revised IS0 7185.) vi IS

33、O/IEC 10206 : 1991 (E) Following the decision that the lirst publication of a standard for the programming language Pascal would not contain extensions to the language, JPC prepared a project proposal to SPARC for an Extended Pascal Standard. When approved by X3 in November 1980, this proposal forme

34、d the charter for Project 345. JPC immediately formed the Extension Task Group to receive all proposals for extensions to the Pascal language, developed the content of proposals so that they were in a form suitable for review by JPC, fairly and equitably reviewed all proposals in light of published

35、JPC policy, and provided a liaison with the public in all matters concerning proposed extensions to the Pascal language. X3 issued a press release on behalf of JPC in January 1980 to solicit extension proposals or suggestions from the general public. At this time, JPC had already prepared a list of

36、priority extensions; public comment served to validate and supplement the priority list. Criteria for evaluating extensions were established and included machine independence, upward compatibility, conceptual integrity, rigorous definition, and existing practice as prime objectives. Extension propos

37、als submitted by the public and by the JPC membership were developed and refined. JPC procedures guaranteed that proposals would be considered over at least two meetings, affording adequate time for review of the technical merits of each proposal. By June of 1983, twelve extensions had been designat

38、ed by JPC as candidate extensions and were published as a Candidate Extension Library. Ongoing work was described in Work in Progress, published with the Candidate Extension Library. This effort served as an interim milestone and an opportunity for the public to review the effort to date. In 1984, B

39、SI also started work on extensions to Pascal, with an initial aim of providing extensions in a few areas only. In 1985, the IS0 Pascal Working Group (then designated ISO/TC97/SC22/WG2, now ISO/IEC JTCl/SC22/WG2) was reconvened after a long break to consider proposals from both ANSI and BSI in an int

40、ernational forum. Thereafter WG2 met at regular intervals to reconcile the national standardization activities in ANSI and BSI and to consider issues raised by the other experts participating in WG2. The Work in Progress, along with other proposals subsequently received, continued its development un

41、til June 1986. The process of reconciling individual candidate extensions among themselves was begun in September 1984 and continueduntil June 1986. During this phase, conflicts between changes were resolved and each change was reconsidered. Working drafts of the full standard were circulated within

42、 JPC and WG2 to incorporate changes from each meeting. The candidate extensions were then integrated into a draft standard that was issued for public review. The Public Comment Task Group (PCTG) was formed to respond to the public comments and recommend changes to the draft. To promote a unified res

43、ponse on each comment issue, PCTG included members from both WG2 and JPC. All responses and recommended changes required final approval by JPC and WG2. PCTG recommended several substantive changes that were subsequently approved as changes to the draft. These changes were incorporated and a new draf

44、t was produced for a second public review. Project charter The goal of JPCs Project 345 was to define an implementable, internationally acceptable Extended Pascal Standard. This International Standard was to encompass those extensions found to be a) compatible with ANSI/IEEE77OX3.97-1983, American N

45、ational Standard Programming Language Pascal, and b) beneficial with respect to cost. JPCs approved program of work included: a) solicitation of proposals for extended language features; vii ISO/IEC 10206 : 1991 (E) b) the critical review of such proposals; c) synthesis of those features found to be

46、 acceptable individually and which are mutually consistent into a working draft proposed standard; d) interface with all interested standards bodies, both domestic and international; e) submission of the working draft to ISOflC97/SC22/WG2; f) synthesis and submission of a draft proposed ANS consiste

47、nt with any international standard developed; g) review and correction of the dpANS in light of any comment received during Public Comment and/or Trial Use periods. Technical development Extended Pascal incorporates the features from ANSI/IEEE770X3.97- 1983 and the following new features: a) Modular

48、ity and Separate Compilation. Modularity provides for separately-compilable program components, while maintaining type security. -Each module exports one or more interfaces containing entities (values, types, schemata, variables, procedures, and functions) from that module, thereby controlling visib

49、ility into the module. -A variable may be protected on export, so that an importer may use it but not alter its value. A type may be restricted, so that its structure is not visible. -The form of a module clearly separates its interfaces from its internal details. -Any block may import one or more interfaces. Each interface may be used in whole or in part. -Entities may be accessed with or without interface-name qualification. -Entities may be renamed on export or import. -Initialization and finalization actions may be specified for each module. -Modules provide a framework for implementat

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 标准规范 > 国际标准 > ANSI

copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
备案/许可证编号:苏ICP备17064731号-1