BS ISO IEC 15145-1997 Information technology - Programming languages - FORTH《信息技术 程序设计语言 FORTH语言》.pdf

上传人:孙刚 文档编号:396346 上传时间:2018-10-18 格式:PDF 页数:219 大小:15.97MB
下载 相关 举报
BS ISO IEC 15145-1997 Information technology - Programming languages - FORTH《信息技术 程序设计语言 FORTH语言》.pdf_第1页
第1页 / 共219页
BS ISO IEC 15145-1997 Information technology - Programming languages - FORTH《信息技术 程序设计语言 FORTH语言》.pdf_第2页
第2页 / 共219页
BS ISO IEC 15145-1997 Information technology - Programming languages - FORTH《信息技术 程序设计语言 FORTH语言》.pdf_第3页
第3页 / 共219页
BS ISO IEC 15145-1997 Information technology - Programming languages - FORTH《信息技术 程序设计语言 FORTH语言》.pdf_第4页
第4页 / 共219页
BS ISO IEC 15145-1997 Information technology - Programming languages - FORTH《信息技术 程序设计语言 FORTH语言》.pdf_第5页
第5页 / 共219页
亲,该文档总共219页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述

1、STD-BSI BS ISOIIEC L5145-ENGL L997 W Lb24bb9 0655982 84b D BRITISH STANDARD Information technology - Programming languages - FORTH ICs 35.060 BS ISO/IEC 15145 : 1997 NO COPYING WITHOUT BSI PERMISSION EXCEPT AS PERMITTED BY COPYRIGHT LAW BS ISO/IEC 15145 : 1997 been prepared under the direction of th

2、e DISC Board, was published under the authority of the Standards Board and comes into effect on 15 November 1997 hd. No. O BSI 1997 ISBN O 680 28771 8 National foreword Text affected This British Standard reproduces verbatim ISO/IEC 15145 : 1997 and implements it as the UK national standaxd. The UK

3、participation in its preparation was entrusted to Technical Committee ISTk, Programming languages, their environments and systems software interfaces, which has the responsibility to: - aid enquirers to understand the text; - present to the responsible internatio - monitor related international and

4、European developments and promulgate them in the UK. A list of organizations represented on this committee can be obtained on request to its secretary. From 1 January 1997, all IEC publications have the number 60000 added to the old number. For instance, IEC 27-1 has been renumbered as JEC 60027-1.

5、For a period of time during the change over from one numbering system to the other, publications may contain identiers from both systems. Cross-references The British standards which implement international or European publications referred to in this document may be found in the BSI Standards Catal

6、ogue under the section entitled ?International Stanards Correspondence Index?, or by using the ?Find? facility of the BSI Standards Electronic Catalogue. Compliance with a British Standard does not of itself confer immunity from legal obligations. Summary of pages This document comprises a front cov

7、er, an inside front cover, the ISO/IEC title page, pages ii to vi, pages 1 to 210, an inside back cover and a back cover. STD-BSI BS ISO/IEC 15L45-ENGL 1977 Lb24bb9 Ob55784 BS ISOiIEC 15145 : 1997 I NTE R NATI O N AL STANDARD ISO/IEC 15145 First edition 1997-04-1 5 Information technology - Programmi

8、ng languages - Forth Technologies de linformation - Langages de programmation - Forth Reference number ISOliEC 15145:1997(E) STD-BSI BS ISOIIEC 15145-ENGL 1977 1b2qbb Db55985 555 BS ISODEC 15145 : 1997 Contents 1 General 1 1.1.1 Inclusions 1 1.1.2 Exclusions . 1 1.2 Document organization . 1 1.2.1 W

9、ord sets . 1 1.2.2 Annexes . 2 1.3 Future directions . 2 1.3.1 New technology . 2 1.3.2 Obsolescent features 2 1.4 Normative References . 2 2 Terms and notation 3 2.1 Definitions of terms . 3 2.2 Notation . 5 2.2.1 Numeric notation . 5 2.2.2 Stack notation 5 2.2.3 Parsed-text notation . 5 2.2.4 Glos

10、sary notation . 6 3 Usage requirements . 8 3.1 Data types 8 3.1.1 Data-type relationships 8 3.1.2 Character types 8 3 . i . 3 Single-cell types 10 3.1.4 Cell-pair types . 11 3.1.5 System types 11 3.2 The implementation environment . 12 3.2.1 Numbers 12 3.2.2 Arithmetic 12 3.2.3 Stacks 13 3.2.4 Opera

11、tor terminal 14 3.2.5 Mass storage 14 3.2.6 Environmental queries . 14 3.3 The Forth dictionary 15 3.3. I Name space 15 3.3.2 Code space . 15 3.3.3 Data space 15 3.4 The Forth text interpreter 17 3.4.1 Parsing . 18 3.4.2 Finding definition names . 18 3.4.3 Semantics . 19 3.4.4 Possible actions on an

12、 ambiguous condition . 19 3.4.5 Compilation . 20 1 . 1 Scope . 1 Descriptors: data processing. computer software. artificial languages. programming languages. advanced language. FORTH . II STD-BSI BS ISOIIEC 1.5145-ENGL 1777 D 1b24bb7 Ob557Bb 491 BS ISO/IEC 16145 : 1997 4 Documentation requirements

13、. 21 4.1 System documentation . 21 4.1 . 1 Implementation-defined options 21 4.1.2 Ambiguous conditions . 22 4.1.3 Other system documentation 23 4.2 Program documentation . 23 4.2.1 Environmental dependencies . 23 4.2.2 5 Compliance and labeling . 24 5.1 ANS Forth systems 24 5.1.1 System compliance

14、24 5.1.2 System labeling 24 5.2 ANS Forth programs 24 5.2.2 Program labeling 24 6 Glossary . 25 6.1 Core words . 25 6.2 Core extension words 49 Other program documentation . 23 5.2.1 Program compliance 24 7 8 The optional Double-Number word set . 65 9 The optional Exception word set . 70 1 O 1 1 12

15、13 The optional Locals word set . 102 14 The optional Memory-Allocation word set 107 15 16 The optional Search-Order word set 117 17 The optional String word set 122 The optional Block word set 59 The optional Facility word set . 74 The optional File-Access word set . 77 The optional Floating-point

16、word set 87 The optional Programming-Tools word set . 110 Annex A (informative) Rationale . 125 A.l Introduction . 125 A.2 Terms and notation . 126 A.3 Usage requirements . 127 AS A.6 Glossary 139 A.7 The optional Block word set . 157 A.8 A.9 The optional Exception word set 158 A . 10 The optional F

17、acility word set 161 A . 1 1 The optional File-Access word set 164 A . 12 A . 13 A.14 A . 15 The optional Programming-Tools word set 172 A . 16 The optional Search-Order word set . 174 A . 17 A.4 Documentation requirements 138 Compliance and labeling 138 The optional Double-Number word set 157 The o

18、ptional Floating-point word set . 166 The optional Locals word set 169 The optional Memory-Allocation word set . 172 The optional String word set . 177 iii BS ISODEC 15145 : 1997 Annex B (informative) Bibliography . i78 Annex C (informative) Perspective 180 C.1 Features of Forth . 180 C.2 History of

19、 Forth 181 C.3 Hardware implementations of Forth . 181 C.4 Standardization efforts 181 C.5 Programming in Forth 182 C.6 Multiprogrammed systems . 188 C.7 Design and management considerations . 188 C.8 Conclusion . Annex D (informative) Compatibility analysis of ANS Forth 189 D.2 Forth 79 189 D.3 For

20、th 83 189 D.4 Recent developments 190 D.5 ANS Forth approach . 190 D.6 Differences from Forth 83 191 Annex E (informative) ANS Forth portability guide . 199 E . i Introduction 199 E.2 Hardware peculiarities 199 E.3 Number representation 201 E.4 Forth system implementation 202 ES ROMed application di

21、sciplines and conventions 203 E.6 Summary . 203 D . i FIG Forth (circa 1978) 189 Annex F (informative) Alphabetic list of words 204 iv STD-BSI BS ISOIIEC LSLLiS-ENGL 2997 9 lb24bb9 Ob55988 2bLi W BS ISOAEC 15145 : 1997 Foreword IS0 (the International Organization for Standardization) and IEC (the In

22、temational Electrotechnical Commission) form the specialized system for worldwide standardization. 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 particular

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

24、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 YO of the national bodies casting a vote. International Standard

25、ISO/IEC I5 145 was prepared by Joint Technical Committee ISO/IEC JTC 1, Information technology, Subcommittee SC 22, Programming languages, their environments and system sofiwnre interfaces. Annexes A to F of this International Standard are for information only. V BS ISO/IEC 16146 : 1997 Introduction

26、 The purpose of this International Standard is to promote the portability of Forth programs for use on a wide variety of computing systems, to facilitate the communication of programs, programming techniques, and ideas among Forth programmers, and to serve as a basis for the future evolution of the

27、Forth language. Forth is a language for direct communication between human beings and machines. Using natural-language diction and machine-oriented syntax, Forth provides an economical, productive environment for interactive compilation and execution of programs. Forth also provides low-level access

28、 to computer-controlled hardware, and the ability to extend the language itself. This extensibility allows the language to be quickly expanded and adapted to special needs and different hardware systems. Forth was invented by Mr. Charles Moore to increase programmer productivity without sacrificing

29、machine efficiency. Forth is a layered environment containing the elements of a computer language as well as those of an operating system and a machine monitor. This extensible, layered environment provides for highly interactive program development and testing. In the interests of transportability

30、of application software written in Forth, standardization efforts began in the mid- 1970s by an international group of users and implementors who adopted the name “Forth Standards Team,. This effort resulted in the Forth-77 Standard. As the language continued to evolve, an interim Forth-78 Standard

31、was published by the Forth Standards Team. Following Forth Standards Team meetings in 1979, the Forth-79 Standard was published in 1980. Major changes were made by the Forth Standards Team in the Forth-83 Standard, which was published in 1983. The first meeting of the Technical Committee on Forth Pr

32、ogramming Systems was convened by the Organizing Committee of the X3J14 Forth Technical Committee on August 3, 1987, and has met subsequently on November 11-12, 1987, February 10-12, 1988, May 25-28, 1988, August 10-13, 1988, October 26-29, 1988, January 25-28, 1989, May 3-6, 1989, July 26-29, 1989,

33、 October 25-28, 1989, January 24-27, 1990, May 22-26, 1990, August 21-25, 1990, November 6-10,1990, January 29-Febniary 2, 1991, May 3-4, 1991, June 16-19, 1991, July 30-August 3, 1991, March 17-21, 1992, October 13- 17, 1992, January 26-30, i 993, June 28-30, 1993, and June 2 i, 1994. This project

34、has operated under joint sponsorship of IEEE as IEEE Project P1141. The TC gratefully acknowledges the support of IEEE in this effort and the participation of the IEEE members who contributed to our work as sponsored members and observers. Requests for interpretation, suggestions for improvement or

35、addenda, or defect reports are welcome. They should be sent to the X3 Secretariat, Computer and Business Equipment Manufacturers Association, 1250 Eye Street, NW, Suite 200, Washington, DC 20005. vi STD-BSI BS ISO/IEC 15L45-ENGL 1777 1b24bb7 Ob55770 712 = BS ISOAEC 15145 : 1997 Information technolog

36、y - Programming languages - Forth I General 1.1 Scope This International Standard specifies an interface between a Forth System and a Forth Program by defining the words provided by a Standard System. 1.1.1 Inclusions This International Standard specifies: - - the forms that a program written in the

37、 Forth language may take; the rules for interpreting the meaning of a program and its data. 1 .i .2 Exclusions This international Standard does not specify: - - - - the mechanism by which programs are transformed for use on computing systems; the operations required for setup and control of the use

38、of programs on computing systems; the method of transcription of programs or their input or output data to or from a storage medium; the program and Forth system behavior when the rules of this International Standard fail to establish an interpretation; the size or complexity of a program and its da

39、ta that will exceed the capacity of any specific computing system or the capability of a particular Forth system; the physical properties of input/output records, files, and units; the physical properties and implementation of storage. - - - I .2 Document organization 1.2.1 Word sets This Internatio

40、nal Standard groups Forth words and capabilities into wordsets under a name indicating some shared aspect, typically their common functional area. Each word set may have an extension, containing words that offer additional functionality. These words are not required in an implementation of the word

41、set. The “Core” word set, defined in clauses 1 through 6, contains the required words and capabilities of a Standard System. The other word sets, defined in clauses 7 through 17, are optional, making it possible to provide Standard Systems with tailored levels of functionality. 1.2.1.1 Text clauses

42、Within each word set, clause 1 contains introductory and explanatory material and clause 2 introduces terms and notation used throughout this International Standard. There are no requirements in these clauses. Clauses 3 and 4 contain the usage and documentation requirements, respectively, for Standa

43、rd Systems and Programs, while clause 5 specifies their labeling. 1 STD-BSI BS ISOIIEC L5145-ENGL L997 Lb2Libb7 Ob55971 859 BS ISO/IEC 16145 : 1997 1.2.1.2 Glossary clauses Clause 6 of each word set specifies the required behavior of the definitions in the word set and the extensions word set. 1.2.2

44、 Annexes The annexes do not contain any required material. Annex A provides some of the rationale behind the committees decisions in creating this International Standard, as well as implementation examples. It has the same numbering as the body of this International Standard to make it easy to relat

45、e each requirements clause to its rationale clause. Annex B is a short bibliography on Forth. Annex C provides an introduction to Forth. Annex D discusses the compatibility of ANS Forth with earlier Forths, emphasizing the differences from Forth 83. Annex E presents some techniques for writing porta

46、ble programs in ANS Forth Annex F includes the words from all word sets in a single list, and serves as an index of ANS Forth words. 1.3 Future directions 1.3.1 New technology This International Standard adopts certain words and practices that are increasingly found in common practice. New words hav

47、e also been adopted to ease creation of portable programs. I .3.2 Obsolescent features This International Standard adopts certain words and practices that cause some previously used words to become obsolescent. Although retained here because of their widespread use, their use in new implementations

48、or new programs is discouraged, because they may be withdrawn from future revisions of this International Standard. This International Standard designates the following words as obsolescent: 6.2.0060 #TIB 15.6.2.1580 FORGET 6.2.2240 SPAN 6.2.0970 CONVERT 6.2.2040 QUERY 6.2.2290 TIB 6.2.1390 EXPECT 1

49、.4 Normative References The following standards contain provisions which, through reference in this text, constitute provisions of this International Standard. At the time of publication, the editions indicated were valid. All standards are subject to revision, and parties to agreements based on this Intemational Standard are encouraged to investigate the possibility of applying the most recent editions of the standards indicated below. Members of IEC and IS0 maintain registers of currently valid International Standards. IS0 646: 1991, Information technology - IS0 7-bit c

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

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

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