5748098 [rkeene@sledge /home/rkeene/devel/archive/quickbasic]$ cat -n sample2.bas
   1: 
   2: rem
   3: rem This program displays the amount of memory available.
   4: rem
   5: rem Under windows the WINDOWS SIZE command sizes the window
   6: rem
   7: 
   8:   rem windows size 35,13,47,18
   9: 
  10: 
  11: rem
  12: rem set where to display on screen
  13: rem
  14:   basey=12
  15:   basex=34
  16: 
  17: 
  18:   cls
  19: 
  20: 
  21:   ot=0
  22: 100
  23: 
  24: rem
  25: rem if any key pressed stop
  26: rem
  27:   a$=inkey$
  28:   if a$<>"" then stop
  29: 
  30: 
  31: rem
  32: rem display free memory
  33: rem
  34:   t=freemem
  35:   if t<>ot then
  36:     color 0,7
  37:     locate basey+1,basex+2
  38:     print freemem
  39:     ot=t
  40:   end if
  41: 
  42: rem
  43: rem add some random sparkle
  44: rem
  45: 
  46: 200
  47:   x=rnd
  48:   x=int(x*13)
  49:   y=rnd
  50:   y=int(y*5)
  51:   x=x+1
  52:   y=y+1
  53:   if y=1 and (x>2 or x<11) then goto 200
  54:   c=rnd
  55:   c=int(c*16)
  56:   color c,0
  57:   locate basey+y,basex+x
  58:   print chr$(219);
  59:   goto 100
  60: 
  61: 
5748099 [rkeene@sledge /home/rkeene/devel/archive/quickbasic]$

Click here to go back to the directory listing.
Click here to download this file.
last modified: 2000-05-09 21:08:54