20.1 ANS-Forth Label. 4tH 4tH Forth compiler
Reklama
Reklama
Chapter 20
ANS Forth statement
Forth, like BASIC, has always suffered from a lack - or may be an abundance of standards.
Both languages had many dialects, which were highly incompatible. However, although there was never a generally accepted BASIC standard, a simple BASIC program can be easily converted to almost any existing implementation of the language.
The Forth community had a different approach to the problem. They kept changing the core every few years, so even now it’s very hard to find a program which can run on any
Forth with little modification. Calling those very different versions a standard didn’t really help.
So when the ANSI-standard committee began its work they had a few very though nuts to crack. In our view the ANS-Forth standard is big step forward, but not perfect. It has not fully regained the simplicity we found in the Forth-79 and still has some serious flaws, although most are an inheritance from Forth-83.
We do feel the need for a real Forth standard, so we tried to make 4tH as ANS-Forth compatible as possible without sacrificing the ease of use that we had in mind when we designed it. About 95% of the CORE wordset is supported.
4tH was built according to the ANS-Forth standard, but with a tiny Forth-79 flavor. Full compliance to the ANS-Forth standard was never an objective. According to the ANS-
Forth standard 4tH cannot be an "ANS-Forth System", since the standard does not cover this kind of implementation.
20.1
ANS-Forth Label
According to the ANS-Forth standard, section 5.2.2, this system is capable of compiling:
ANS Forth Programs
Requiring:
• the Block word set
• the Exception word set
• the Memory word set
• the String Extensions word set
374
Atsisiųsti
Reklama