home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d9xx / d969 / ace.lha / ACE / ACE-2.0.lha / PRGS.lha / Turtle / boxit.b next >
Text File  |  1994-01-10  |  453b  |  35 lines

  1. '...recursive triangle consisting of boxed edges.
  2.  
  3. sub boxit(n)
  4.   if n=0 then 
  5.     forward 2
  6.   else
  7.     boxit(n-1)
  8.     turnleft 90
  9.     boxit(n-1)
  10.     turnright 90
  11.     boxit(n-1)
  12.     turnright 90
  13.     boxit(n-1)
  14.     turnleft 90
  15.     boxit(n-1)
  16.   end if 
  17. end sub
  18.  
  19. window 1,"BoxIt",(0,0)-(640,200)
  20. color 2,1
  21.  
  22.  cls
  23.  penup
  24.  setxy 0,150
  25.  pendown
  26.  turnright 90
  27.  boxit(4)
  28.  
  29.  locate 22,1
  30.  print "press 'q' to quit."
  31.  while ucase$(inkey$)<>"Q":wend
  32.  
  33. window close 1
  34.  
  35.