home *** CD-ROM | disk | FTP | other *** search
- /*
- Function: Sv_FadeOut()
- System: GRUMPFISH LIBRARY
- Author: Greg Lief
- Copyright (c) 1988-90, Greg Lief
- Clipper 5.x Version
- Compile instructions: clipper svfadeo /n/w/a
-
- Syntax: Sv_FadeOut(<filename>)
-
- Parameter: <filename> is a character string representing the name
- of file in which to save the random coordinates.
-
- Returns: Nada
- */
- function Sv_FadeOut(cfile)
- local maxrow := maxrow()+1, maxcol := maxcol()+1, x, mrow, mcol
- local elements := maxrow * maxcol, oldprinter := set(_SET_PRINTFILE, cfile)
- local oldconsole := set(_SET_CONSOLE, .F.), a[elements], ncount := 0
- set print on
- afill(a, 0)
- do while ncount < elements
- x := gfrand(elements)
- if a[x+1] == 0
- a[x+1] := 1
- mrow := INT(x / maxcol)
- mcol := INT(x % maxcol)
- ?? chr(mrow) + chr(mcol)
- ncount++
- ENDIF
- ENDDO
- set(_SET_PRINTFILE, oldprinter)
- set(_SET_CONSOLE, oldconsole)
- set print off
- return NIL
-
- * end function Sv_FadeOut()
- *--------------------------------------------------------------------*
-
- * eof: svfadeo.prg
-