Category : BASIC Source Code
Archive   : QB_CODE.ZIP
Filename : QSRTSNG.BAS

 
Output of file : QSRTSNG.BAS contained in archive : QB_CODE.ZIP
'
' QSRTSNG.BAS - For the QuickBASIC Toolbox
' Quick Sort Single Precision Routine
'

'
' $INCLUDE: 'TOOLBOX.BI'
'

DEFINT A-Z

SUB QSORTSNG (ARRAY!(), LEFT, RIGHT)
IF RIGHT > LEFT THEN
I = LEFT - 1
J = RIGHT
DO
DO
I = I + 1
LOOP WHILE ARRAY!(I) < ARRAY!(RIGHT)
DO
J = J - 1
LOOP WHILE ARRAY!(J) > ARRAY!(RIGHT) AND J > LEFT
SWAP ARRAY!(I), ARRAY!(J)
LOOP WHILE J > I
SWAP ARRAY!(I), ARRAY!(J)
SWAP ARRAY!(I), ARRAY!(RIGHT)
QSORTSNG ARRAY!(), LEFT, I - 1
QSORTSNG ARRAY!(), I + 1, RIGHT
END IF
END SUB



  3 Responses to “Category : BASIC Source Code
Archive   : QB_CODE.ZIP
Filename : QSRTSNG.BAS

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/