You are describing the Shuffle Sort!by Solitairewhich uses the swap routine and is the most efficient way. I wanted to emulate removing the selected random number, as if pulling a ticket out of a hat until there was none left. I could also have put the selected numbers back into another array and diminished the original array (with a variation of ReDim Preserve, which isn't available in QB 1.1 or 4.5). With the Shuffle Sort, all numbers need to be swapped even if you only need to select a few out of the range. However, by using the Select & Discard algorithm, you could stop after just a few selections and leave the remaining array as it was, reducing the number of repeats. These comments and more were added to the FAQ subforum: www.network54.com/Forum/171757/message/1206945111/Compare+this+with+the+Shuffle+Sort
from IP address 24.90.213.75 |
| Response Title | Author and Date |
| Posting hint, Sol | on Mar 31 |
| I never typed the url. I did a copy and paste on it. | Solitaire on Mar 31 |
| Amazing | on Mar 31 |
| * What gray box? What message text? I'm using IE. | Solitaire on Apr 1 |
| * The text box with the Font and Size Box at top of Message text | on Apr 1 |
| This grey box | on Apr 1 |
| Nope. I absolutely do not have any such box anywhere. | Solitaire on Apr 2 |
| * Maybe put network54 in your IE Trusted Zone | on Apr 2 |