home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / libbasic / boxes.bas < prev    next >
BASIC Source File  |  1992-05-26  |  881b  |  36 lines

  1.  
  2.  
  3.     ' draw some boxes
  4.  
  5.     dim color$(6)
  6.     color$(1) = "red"
  7.     color$(2) = "brown"
  8.     color$(3) = "yellow"
  9.     color$(4) = "green"
  10.     color$(5) = "blue"
  11.     color$(6) = "darkpink"
  12.  
  13.     count = 1
  14.     vector = 1
  15.  
  16.     open "Boxes" for graphics as #1
  17.         print #1, "down"
  18.         print #1, "size 1"
  19.         print #1, "place 130 130"
  20.         for x = 30 to 230 step 5
  21.             print #1, "color "; color$(count)
  22.             count = count + vector
  23.             if count = 1 and vector < 0 then vector = 1
  24.             if count = 6 then vector = -1
  25.             print #1, "box "; x ; " "; 260 - x
  26.             print #1, "flush"
  27.         next x
  28.         print #1, "segment"
  29.         input #1, segId
  30.         for x = 1 to segId - 1 step 2
  31.             print #1, "delsegment "; x
  32.         next x
  33.         print #1, "redraw"
  34.         input r$
  35.     close #1
  36.