Liste des Groupes | Revenir à cl forth |
On 17 Sep 2024 at 21:12:08 CEST, "Anthony Howe" <achowe@snert.com> wrote:If VFX Forth allows to obtain sub-xts from the main xt, then FVX Forth effectively has multiple xts associated with an nt.
On 2024-09-17 06:54, Ruvim wrote:VFX Forth 64 is a single xt system (with sub-xts) .Do you think that the Forth standard should recognize the classic single-xt>
approach as possible for implementing a standard Forth system?
>
The classic single-xt approach implies that only one execution token (xt) is
associated with a name token (nt), and only one name token is associated with a
word (a named Forth definition). And words whose compilation semantics differ
form default compilation semantics are implemented as immediate words.
Given I prefer single-xt (currently), what I don't get is how for a dual-xt
system you define a single word with two actions for interpret and compile. I
don't see a word to distinguish between the two, except maybe IMMEDIATE.
It manages to separateThis implementation is not standard compliant, because `compile,`, which shall has stack effect ( xt -- ), consumes and produces some other stack parameters for some xts, e.g.
compilation and interpret actions for a word cleanly. S" is defined as below:
: S" \ Comp: "ccc<quote>" -- ; Run: -- c-addr u 6.1.2165
\ *G Describe a string. Text is taken up to the next double-quote
\ ** character. The address and length of the string are returned.
[char] " parse >syspad
;
ndcs: ( -- ) discard-sinline compile (s") ", ;
NDCS: describes the non-default compilation sematics of the word.
Les messages affichés proviennent d'usenet.