Skip to content
Discussion options

You must be logged in to vote

This definition for compose does not contain nested definitions, and there is no attempt to nest compilation of definitions. So, this definition for compose is standard-compliant in Forth-1994, as well as in Forth-2012.

A problem can occur when executing compose. Namely, if it is executed while another definition is being compiled (i.e., the current definition is present), it violates 3.4.5.

A correct usage example:

' foo ' bar compose constant func-foobar

In this case, the current definition is absent when compose is executed.

An incorrect usage example:

: baz  [ ' foo  ' bar compose compile, ] ;

In this case, the current definition is present when compose is executed — namely, compilat…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@SirWumpus
Comment options

Answer selected by SirWumpus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
clarification Rationale or explanation to the Forth standard
2 participants