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

 
Output of file : SSRTDBLI.BAS contained in archive : QB_CODE.ZIP
'
' SSRTDBLI.BAS - For the QuickBASIC Toolbox
' Shell Sort Indexed Double Precision Routine
'

'
' $INCLUDE: 'TOOLBOX.BI'
'

DEFINT A-Z

SUB SSORTDBLI (ARRAY#(), LEFT, RIGHT, INDEX())
LENGTH = RIGHT - LEFT + 1
DO
LENGTH = LENGTH \ 2
IF LENGTH < 1 THEN
EXIT SUB
END IF
LOWER = LEFT
UPPER = LOWER + LENGTH
DO
HIGHEST = LOWER
DO WHILE ARRAY#(UPPER) < ARRAY#(LOWER)
SWAP ARRAY#(LOWER), ARRAY#(UPPER)
SWAP INDEX(LOWER), INDEX(UPPER)
UPPER = LOWER
LOWER = UPPER - LENGTH
IF LOWER < LEFT THEN
EXIT DO
END IF
LOOP
LOWER = HIGHEST + 1
UPPER = LOWER + LENGTH
LOOP UNTIL UPPER > RIGHT
LOOP
END SUB



  3 Responses to “Category : BASIC Source Code
Archive   : QB_CODE.ZIP
Filename : SSRTDBLI.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/