Liste des Groupes | Revenir à cl forth |
On 2024-09-23 09:28, dxf wrote:On 23/09/2024 2:57 am, Ruvim wrote:...NB: Keeping floating-point numbers on the data stack does not make a Forth system non-standard, but it merely adds an environmental restriction to this system, see the section "12.4.1.4 Environmental restrictions" in Forth-2012.>
I hadn't seen that. Forth-94 stated floating-point stack was "the default".
If the only change is that the latter is clarified, then no harm done.
Implementing separate stack on an 8-bit cpu would be expensive and a
performance killer.As to being "far simpler" to program, similar appeals
are made in respect of locals.
I make it a point to program as if I had a
unified stack just to see if the claim is true.
A real problem was to create programs that work with floating point numbers and would work correctly both on a unified fp stack and on a separate fp stack.
...
If a Forth system is so limited in memory that it cannot provide two buffers for `s"`, it *might* provide only one buffer and declare the corresponding environmental restriction according to the sections:
- 5.1.1 System compliance
| An otherwise Standard System (Subset) that fails to comply
| with one or more of the minimum values or ranges specified
| in "3 Usage requirements" and its sub-sections has
| environmental restrictions.
- 5.1.2 System labeling
| The phrase "with Environmental Restrictions" shall be
| appended to the label of a Standard System (Subset) that
| has environmental restrictions.
- 11.3 Additional usage requirements, 11.3.4 Other transient regions
| The system provides transient buffers for `S"` and `S\"`
| regions strings. These buffers shall be no less than 80
| characters in length, and there shall be at least two buffers.
Les messages affichés proviennent d'usenet.