aboutsummaryrefslogtreecommitdiff
path: root/buzzard/demo3.th
blob: c061b7407a9978cc0a199fc09b6920c01f383d56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
: printfour

	dup		( save the number on top of the stack )
	4 =		( compare it to four )
	if
	  " forth "	( output a string for it )
	  drop		( and delete the saved value )
        else
	  .
	endif
;

: demo3 10 0 do i printfour loop cr ;

demo3