First page Back Continue Last page Overview Graphics

Forth Language

Indefinite Loop Example:


: pad2 ( n - m | m is next power of 2, >= n)
	DUP 0 <= IF DROP 1 THEN 1 
	BEGIN 
	  2DUP > 
	WHILE 
	  2*
  REPEAT
  NIP ;

348 pad2 .