6.10.12 Forward

The defining word Forward in forward.fs allows you to create forward references, which are resolved automatically, and do not incur additional costs like the indirection of Defer. However, these forward definitions only work for colon definitions.

forward ( "name" –  ) gforth-1.0 “forward”

Defines a forward reference to a colon definition. Defining a colon definition with the same name in the same wordlist resolves the forward references. Use .unresolved to check whether any forwards are unresolved.

.unresolved ( ) gforth-1.0 “.unresolved”

print all unresolved forward references