home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / forth / compiler / fpc / source / p4_1dc.seq < prev    next >
Encoding:
Text File  |  1990-04-10  |  398 b   |  19 lines

  1. \ Problem 4.1    04/10/90 14:59:23.41
  2.  
  3.  
  4. \ a) The execution will enter a endness loop and executes forever.
  5.  
  6. \ b) All of the three viersions will execute forever.
  7.  
  8.  
  9. : HSTARS        ( n -- )
  10.         0 ?DO ASCII * EMIT LOOP ;
  11.  
  12. : VSTARS        ( n -- )
  13.         0 SWAP ?DO CR ASCII * EMIT LOOP ;
  14.  
  15. : STARS         ( n -- )
  16.         DUP 0> IF HSTARS ELSE
  17.                   VSTARS THEN ;
  18.  
  19.