American National Standard for Information Systems

Programming Languages

Forth

Secretariat
Computer and Business Equipment Manufacturers Association
Approved: March 24, 1994
American National Standards Institute, Inc.


Copyright (c) 1994 by Technical Committee X3J14. All rights reserved.

This is a working document of Technical Committee X3J14 which represents the last draft of ANS Forth submitted to ANSI for publication. Permission is hereby granted to copy this document provided that it is copied in its entirety without alteration or as altered by (1) adding text that is clearly marked as an insertion; (2) shading or highlighting existing text; and/or(3) deleting examples.

Specifically, permission is granted to use this working document as the foundation for textbooks, system manuals, and online documentation so long as the requirements in the preceding paragraph are met and the resulting product addresses a technical need that is not practically met by the official ANS.

NOTE:
This file is provided as a working document of the TC for public review and comment as well as documentation uses described above. It is not intended as a substitute for the official ANS Forth document published by ANSI. In the event of conflict, only the printed document X3.215-1994 represents the official ANS Forth.

To obtain the official standard, please contact the American National Standards Institute Sales Department, at (212) 642-4900 or FAX (212) 302-1286, or Global Engineering Documents, at (800) 854-7179 or FAX (303) 843-9880, and request Document X3.215-1994. Thank you very much for your interest.


Editorial Notes:

V2.1 - September 1, 1995

This HTML version of this document was prepared by:

Norman E. Smith
72745,1566@Compuserve.com

It was prepared from the Microsoft Word document posted by the Technical Commettee in early 1995. See their readme file for the details and conditions of using the postings. The Microsoft Word and Postscript versions of the document are available on ftp://ftp.uu.net/vendor/minerva... and a Postscript and FPC hyperlinked ASCII version are also available on Taygeta.

This second version has extensive hyperlinks added. These are content related. The 'See:' references to words link directly to their glossary entry for example. Because the original document was well structured and the conversion was to a proper HTML file, much of the hyperlink generation can be automated. Even though little had to be done manually, the large number of links and anchors caused the additional was more work than I expected.

The files that make up this document were created using Standardized Generalized Markup Language (SGML) based autotaging software. For this reason, all of the files also parse correctly with the current HTML Document Type Definitions (DTDs).

I am planning a third pass at the document to do a proper SGML representation of the word glossaries and additional links in the text. At that point, I will be able to generate a word glossary in just about any format.

The process of spliting the document into managable (about 20k) files, generating the Table of Contents, and inserting the structural hyperlinks was done with a program written in Until. Until is my almost-Forth, written in very generic C, that is also available on Taygeta. The Until Reference Manual can be browsed on Taygeta as well.

Lastly, thanks to the X3J14 Technical Committee for making the Word version of the document available and to Skip Carter for making space available on Taygeta for not only this document, but the wealth of other Forth infomation available there.

Changes:

03/30/95 - V2.0 - Added hundreds of anchors and links.

02/28/95 - V1.2 - The 02/23/95 version used an old version of the table of contents file with incorrect hyperlinks. This version corrects that. Sorry!

02/23/95 - V1.1- Added title page from original document that was lost during initial conversion per request of the Technical Committee.

Enjoy!
Norman Smith


Table of Contents

Foreword
X3 Membership
X3J14 Membership

1. Introduction

1.1 Purpose
1.2 Scope
1.3 Document organization
1.4 Future directions

2. Terms, notation, and references

2.1 Definitions of terms
2.2 Notation
2.3 References

3 Usage requirements

3.1 Data types
3.2 The implementation environment
3.3 The Forth dictionary
3.4 The Forth text interpreter

4. Documentation requirements

4.1 System documentation
4.2 Program documentation

5. Compliance and labeling

5.1 ANS Forth systems
5.2 ANS Forth programs

6. Glossary

6.1 Core words
6.2 Core extension words

7. The optional Block word set

7.1 Introduction
7.2 Additional terms
7.3 Additional usage requirements
7.4 Additional documentation requirements
7.5 Compliance and labeling
7.6 Glossary

8. The optional Double-Number word set

8.1 Introduction
8.2 Additional terms and notation
8.3 Additional usage requirements
8.4 Additional documentation requirements
8.5 Compliance and labeling
8.6 Glossary

9. The optional Exception word set

9.1 Introduction
9.2 Additional terms and notation
9.3 Additional usage requirements
9.4 Additional documentation requirements
9.5 Compliance and labeling
9.6 Glossary

10. The optional Facility word set

10.1 Introduction
10.2 Additional terms and notation
10.3 Additional usage requirements
10.4 Additional documentation requirements
10.5 Compliance and labeling
10.6 Glossary

11. The optional File-Access word set

11.1 Introduction
11.2 Additional terms
11.3 Additional usage requirements
11.4 Additional documentation requirements
11.5.1 ANS Forth systems
11.6 Glossary

12. The optional Floating-Point word set

12.1 Introduction
12.2 Additional terms and notation
12.3 Additional usage requirements
12.4 Additional documentation requirements
12.5 Compliance and labeling
12.6 Glossary

13. The optional Locals word set

13.1 Introduction
13.2 Additional terms and notation
13.3 Additional usage requirements
13.4 Additional documentation requirements
13.5 Compliance and labeling
13.6 Glossary

14. The optional Memory-Allocation word set

14.1 Introduction
14.2 Additional terms and notation
14.3 Additional usage requirements
14.4 Additional documentation requirements
14.5.1 ANS Forth systems
14.6 Glossary

15. The optional Programming-Tools word set

15.1 Introduction
15.2 Additional terms and notation
15.3 Additional usage requirements
15.4 Additional documentation requirements
15.5 Compliance and labeling
15.6 Glossary

16. The optional Search-Order word set

16.1 Introduction
16.2 Additional terms and notation
16.3 Additional usage requirements
16.4 Additional documentation requirements
16.5 Compliance and labeling
16.6 Glossary

17. The optional String word set

17.1 Introduction
17.2 Additional terms and notation
17.3 Additional usage requirements
17.4 Additional documentation requirements
17.5 Compliance and labeling
17.6 Glossary

A. Rationale (informative annex)

A.1 Introduction
A.2 Terms and notation
A.3 Usage requirements
A.4 Documentation requirements
A.5 Compliance and labeling
A.6 Glossary
A.7 The optional Block word set
A.8 The optional Double-Number word set
A.9 The optional Exception word set
A.10 The optional Facility word set
A.11 The optional File-Access word set
A.12 The optional Floating-Point word set
A.13 The optional Locals word set
A.14 The optional Memory-Allocation word set
A.15 The optional Programming-Tools word set
A.16 The optional Search-Order word set
A.17 The optional String word set

B. Bibliography (informative annex)

Industry standards
Books
Journals, magazines and newsletters
Selected articles

C. Perspective (informative annex)

C.1 Features of Forth
C.2 History of Forth
C.3 Hardware implementations of Forth
C.4 Standardization efforts
C.5 Programming in Forth
C.6 Multiprogrammed systems
C.7 Design and management considerations
C.8 Conclusion

D. Compatibility analysis of ANS Forth (informative annex)

D.1 FIG Forth (circa 1978)
D.2 Forth-79
D.3 Forth-83
D.4 Recent developments
D.5 ANS Forth approach
D.6 Differences from Forth-83

E. ANS Forth portability guide (informative annex)

E.1 Introduction
E.2 Hardware peculiarities
E.3 Number representation
E.4 Forth system implementation
E.5 ROMed application disciplines and conventions
E.6 Summary

F. Alphabetic list of words (informative annex)