Forth (programming language): Difference between revisions

Content deleted Content added
No bare URLs. Remove Cleanup bare URLs template
ce
Line 139:
A defined word generally consists of ''head'' and ''body'' with the head consisting of the ''name field'' (NF) and the ''link field'' (LF), and body consisting of the ''code field'' (CF) and the ''parameter field'' (PF).
 
Head and body of a dictionary entry are treated separately because they may not be contiguous. For example, when a Forth program is recompiled for a new platform, the head may remain on the compiling computer, while the body goes to the new platform. In some environments (such as [[embedded system]]s) the heads occupy memory unnecessarily. However, some cross-compilers may put heads in the target if the target itself is expected to support an interactive Forth.<ref name="lx5fY">{{cite journal |last=Martin |first=Harold M. |date=March 1991 |title=Developing a tethered Forth model |journal=ACM SigforthSIGFORTH Newsletter |volume=2 |issue=3 |pages=17–19 |publisher=ACM Press |doi=10.1145/122089.122091 |doi-access=free | s2cid=26362015}}</ref>
 
The exact format of a dictionary entry is not prescribed, and implementations vary.