go-first

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

demo3.th (245B)


      1 : printfour
      2 
      3 	dup		( save the number on top of the stack )
      4 	4 =		( compare it to four )
      5 	if
      6 	  " forth "	( output a string for it )
      7 	  drop		( and delete the saved value )
      8         else
      9 	  .
     10 	endif
     11 ;
     12 
     13 : demo3 10 0 do i printfour loop cr ;
     14 
     15 demo3