DO

Interpretation:

Interpretation semantics for this word are undefined.

Compilation:

( C: -- do-sys )

Place do-sys onto the control-flow stack. Append the run-time semantics given below to the current definition. The semantics are incomplete until resolved by a consumer of do-sys such as LOOP.

Run-time:

( n1 | u1 n2 | u2 -- ) ( R: -- loop-sys )

Set up loop control parameters with index n2 | u2 and limit n1 | u1. An ambiguous condition exists if n1 | u1 and n2 | u2 are not both the same type. Anything already on the return stack becomes unavailable until the loop-control parameters are discarded.

See:

Rationale:

Typical use:

   : X ... limit first DO ... LOOP ;

or

   : X ... limit first DO ... step +LOOP ;

Testing:

ContributeContributions