home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 19 / CD_ASCQ_19_010295.iso / dos / prg / bas / hanlin3 / pbc30a / mshuffst.bas < prev    next >
BASIC Source File  |  1994-03-13  |  650b  |  15 lines

  1. '   +----------------------------------------------------------------------+
  2. '   |                                                                      |
  3. '   |        PBClone  Copyright (c) 1990-1994  Thomas G. Hanlin III        |
  4. '   |                                                                      |
  5. '   +----------------------------------------------------------------------+
  6.  
  7. DECLARE FUNCTION RndI% (TopValue%)
  8.  
  9. SUB MatShuffleSt (Array() AS STRING, StartPosn%, EndPosn%)
  10.    Elements% = EndPosn% - StartPosn% + 1
  11.    FOR tmp% = StartPosn% TO EndPosn%
  12.       SWAP Array(tmp%), Array(RndI%(Elements%) + StartPosn%)
  13.    NEXT
  14. END SUB
  15.