6 Glossary

6.1 Core words

6.2 Core extension words


flaagelavatar of flaagel [104] GNU C RESTRICT would make sense in the standardSuggested reference implementation2019-08-05 17:25:38

IMMEDIATE sets the corresponding flag in the latest compiled word header. GNU Forth RESTRICT sets the compile-only flag in a similar manner. I think it should be standardized for the sake of completeness.

ruvavatar of ruv

restrict in Gforth is synonym for compile-only. Its behavior is described as "Remove the interpretation semantics of a word". Such behavior description cannot take place in the standard.

By the standard, if a word with undefined interpretation semantics is encountered by the text interpreter in interpretation state the occurring behavior is implementation specific. A possible variant is to even perform its compilation semantics. There is no much sense for a standard program to transform the well defined interpretation semantics of some word to something unknown, that will be depend on implementation.

AntonErtlavatar of AntonErtl

Gforth 0.7 and earlier performs -14 throw when text-interpreting a compile-only word.

In the next release all words have interpretation semantics (for compile-only words often the same as the compilation semantics). The meaning of compile-only now is that you get a warning in text interpretation and when ticking.

PeterKnaggsavatar of PeterKnaggs

This has been discussed at the standards meeting, we do not think that a proposal of this nature would achieve consensus. Common practice has not yet been established. This feeds into related topics such as dual semantic words, that are being discussed.

Reply New Version