home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / PROG_GEN / FORTH_86.ZIP / EXAMPLE1.4TH < prev    next >
Text File  |  1993-10-23  |  521b  |  16 lines

  1. on printload
  2. off redefine
  3.  
  4.  : test1  5 0 do i . crlf loop ;     
  5.  : test2 15 0 do i . tab  3 +loop ;    
  6.  : test3 10 0 do i . 2 spcs  loop ;  
  7.  : test4 20 5 do i . loop ;
  8.  
  9.  ( note that a COLON starts each definition -- a SEMICOLON ends it
  10.    the word LOOP increments the loop counter by 1
  11.    The word +LOOP increments by the digit which precedes it
  12.    the period character [ point ] is called DOT and prints an integer
  13.    digit in decimal.  The brackets (  )  are comment delimiters and can
  14.    be nested )
  15. w1
  16.