BS 5904-1980 Specification for computer programming language RTL 2《计算机程序设计语言RTL 2规范》.pdf
《BS 5904-1980 Specification for computer programming language RTL 2《计算机程序设计语言RTL 2规范》.pdf》由会员分享,可在线阅读,更多相关《BS 5904-1980 Specification for computer programming language RTL 2《计算机程序设计语言RTL 2规范》.pdf(52页珍藏版)》请在麦多课文档分享上搜索。
1、BRITISH STANDARD BS 5904:1980 Incorporating Amendment Nos. 1 and 2 Specification for Computer programming language RTL/2 UDC 681.3.06RTL/2BS5904:1980 This British Standard, having been prepared under the directionof the Data ProcessingStandards Committee, was published under the authorityofthe Execu
2、tive Board and comes into effect on 30September1980 BSI 03-2000 The following BSI references relate to the work on this standard: Committee reference DPS/13 Draft for comment 78/64581 DC ISBN 0 580 11441 4 Cooperating organizations The Data Processing Standards Committee, under whose direction this
3、British Standard was prepared, consists of representatives from the following Government departments and scientific and industrial organizations: British Computer Society Ltd.* British Equipment Trade Association* British Paper and Board Industry Federation (PIF) British Printing Industries Federati
4、on Central Computer Agency (Civil Service Department)* Committee of London Clearing Bankers on behalf of the Committee of Scottish Clearing Bankers, Cooperative Bank, Central Trustee Savings Bank and Yorkshire Bank Department of Industry (Computers Systems and Electronics) Department of Industry (Na
5、tional Physical Laboratory)* Electricity Supply Industry in England and Wales* Government Communications Headquarters HM Customs and Excise Institute of Cost and Management Accountants Institute of Purchasing and Supply Institution of Electrical Engineers Institution of Mechanical Engineers Inter-un
6、iversity Committee on Computing London Transport Executive Ministry of Defence* National Computer Users Forum National Computing Centre Ltd.* National Research Development Corporation Post Office* Society of British Aerospace Companies Limited The organizations with an asterisk in the above list, to
7、gether with the following, were directly represented on the committee entrusted with the preparation of this British Standard: Association for Literary and Linguistic Computing Association of Computer Units in Colleges of Higher Education (ACUCHE) British Gas Corporation Computing Services Associati
8、on Control and Automation Manufacturers Association (BEAMA) Edinburgh Regional Computing Centre Engineering Equipment Users Association Hatfield Polytechnic University of London Amendments issued since publication Amd. No. Date of issue Comments 3722 July 1981 8233 October 1994 Indicated by a sideli
9、ne in the marginBS5904:1980 BSI 03-2000 i Contents Page Cooperating organizations Inside front cover Foreword ii 1 Scope 1 2 Reference 1 3 Definitions 1 4 Syntax 1 4.1 Syntactic metalanguage 1 4.2 Example 1 4.3 Syntax requirements 1 5 Examples 5 6 Compliance 5 6.1 Implementations 5 6.2 Programs 6 7
10、Requirements 6 7.1 Basic elements 6 7.2 Declarations 12 7.3 Expressions 22 7.4 Statements 33 7.5 Modules 40 7.6 Integrity 41 Appendix A Information on input/output 43 Appendix B Information on error recovery 44 Appendix C Recommendation on compiler limits 44 Figure 1 Numerical mode conversion in con
11、ditional expressions 25 Figure 2 Numerical mode conversion for operands 27 Table 1 Alphabetical lists of syntax requirements 2 Table 1A Item syntax 2 Table 1B Module syntax 3 Table 2 RTL/2 character set 7 Table 3 Keywords 9 Table 4 Monadic operators, operands and results 28 Table 5 Dyadic operators,
12、 operands, results and precedence 29 Table 6 Form of result of use of shift operators 30 Publications referred to Inside back coverBS5904:1980 ii BSI 03-2000 Foreword This standard has been prepared under the direction of the Data Processing Standards Committee and extracts in this standard from “RT
13、L/2 Language Specification”, Version2, ICI, 1974 are reproduced by permission of Imperial Chemical Industries Limited. In drafting this standard the continued stability of RTL/2 has been a prime objective. However, apart from changes to clarify or correct the specification, a few minor alterations h
14、ave seemed advisable. These affect the scope of record component names, strings, LET definitions, equality of label values and the character set. These alterations have been carefully designed to correct features of the original specification that with hindsight have proved to be inappropriate and y
15、et do not alter the semantics of valid programs. RTL/2 provides a method for writing both application and system programs for use in real-time computing and is especially suited for on-line data acquisition, communication and control systems. The overall objectives of the language are: a) to reduce
16、the direct cost of the development and maintenance of software; b) to encourage the creation of more reliable systems; c) to increase the mobility of programming staff; d) to provide continuity of method and flexibility in choice of equipment by ensuring the portability of application programs. RTL/
17、2 is designed to be as machine-independent as practicable even at the expense of certain (probably obsolescent) machine architectures. RTL/2 recognizes, however, that operating systems need a degree of flexibility that is incompatible with the security needs of application programs. Accordingly, RTL
18、/2 comprises two languages, the full language being the system language, and a secure subset (see7.6) being the application language. It is virtually impossible to define precisely a high-level language so that programs will be executed equally efficiently by all types of computer. It has therefore
19、been necessary to leave certain areas of RTL/2 deliberately unspecified so that implementations can take the best advantage of characteristics of particular computers. The most, important of these areas are: a) accuracy and range of real values; b) number of bits in an integer word; c) behaviour on
20、arithmetic overflow. Such areas are indicated in this standard by the use of phrases such as “implementation-dependent”. On the other hand, it should be noted that the representation of integer values has been explicity specified to be in twos complement form; thus implementations of RTL/2 on comput
21、ers that do not use this representation will be less efficient. Program structure. A computer that is not specifically designed to execute RTL/2 code directly would need to be enhanced with various control routines to create an RTL/2 machine. In a simple single-state machine, the rest of the softwar
22、e, if derived from RTL/2, could be of items of software of similar status and this group of items would be known as a “program complex”. More usually, however, and of necessity in a two-state machine, the remaining software has a hierarchical structure. The top level, usually known as the “superviso
23、r”, is itself a program complex and the individual groups of lower levels can themselves be considered to be program complexes, but with an environment different from that of the supervisor complex. An RTL/2 complex consists of a collection of items known as bricks, of which there are the following
24、types: a) procedure brick; b) data brick; c) stack brick.BS5904:1980 BSI 03-2000 iii A procedure brick consists of the declaration of a single literal procedure. A procedure is a read-only piece of code describing an executable process, and may have parameters and local variables, but the latter are
- 1.请仔细阅读文档,确保文档完整性,对于不预览、不比对内容而直接下载带来的问题本站不予受理。
- 2.下载的文档,不会出现我们的网址水印。
- 3、该文档所得收入(下载+内容+预览)归上传者、原创作者;如果您是本文档原作者,请点此认领!既往收益都归您。
下载文档到电脑,查找使用更方便
10000 积分 0人已下载
下载 | 加入VIP,交流精品资源 |
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- BS59041980SPECIFICATIONFORCOMPUTERPROGRAMMINGLANGUAGERTL2 计算机 程序设计语言 RTL2 规范 PDF

链接地址:http://www.mydoc123.com/p-545475.html