| dup [ unlock rom-dictionary area lock ] |
dup [ unlock rom-dictionary area lock ] |
| literal literal within |
literal literal within |
| IF |
IF |
| >name dup ?? <> |
>head-noprim dup ?? <> |
| ELSE |
ELSE |
| forth-wordlist @ (look) |
forth-wordlist @ (look) |
| THEN ; |
THEN ; |
| [ELSE] |
[ELSE] |
| : look ( cfa -- lfa flag ) |
: look ( cfa -- lfa flag ) |
| >name dup ??? <> ; |
>head-noprim dup ??? <> ; |
| [THEN] |
[THEN] |
| |
|
| [ELSE] |
[ELSE] |
| |
|
| : PrimStart ['] true >name ; |
: PrimStart ['] true >head-noprim ; |
| |
|
| : look ( cfa -- lfa flag ) |
: look ( cfa -- lfa flag ) |
| dup in-dictionary? |
dup in-dictionary? |
| IF |
IF |
| >name dup ??? <> |
>head-noprim dup ??? <> |
| ELSE |
ELSE |
| PrimStart (look) |
PrimStart (look) |
| THEN ; |
THEN ; |
| |
|
| [THEN] |
[THEN] |
| [THEN] |
[THEN] |
| |
|
| |
: >head ( cfa -- nt|0 ) \ gforth to-head |
| |
\G tries to find the name token nt of the word represented by cfa; |
| |
\G returns 0 if it fails. This word is not absolutely reliable, |
| |
\G it may give false positives and produce wrong nts. |
| |
look and ; |
| |
|
| |
' >head ALIAS >name \ gforth to-name |
| |
\G old name of @code{>head} |