Liste des Groupes | Revenir à cl forth |
On 15/07/2024 20:37, Ruvim wrote:^^^^^^^^>It can be done by using DEFER as a forward definition>>
RECURSIVE also allows you to tick the word in its own definition (not
possible with RECURSE), a feature that I actually have used;
I think, there should be a standard method to get the xt of the current definition (regardless whether it is a named definition, or nameless definition).
>
e.g.
defer foo
:noname ... ['] foo defer@ ... ; is foo
using DEFER@ gives the xt of the code, omittimg it gives the xt of the name.
as FOO can be called by name by executing
synoname foo recurse
I would guess that your suggestion of FORWARD FOO could be defined using that and something like EXECUTE-PARSING e.g. copying "FOO RECURSE" to a buffer and doing:--
BUF COUNT ' SYNONYM EXECUTE-PARSING
followed by IMMEDIATE of course
As DEFER can be used as a forward definition it can also be used for mutual recursion
Les messages affichés proviennent d'usenet.