home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nibble Magazine
/
nib19b.dsk
/
SORT.bas
< prev
next >
Wrap
BASIC Source File
|
2023-02-26
|
253b
|
9 lines
300 REM --SORT N ITEMS OF DATA IN D%()
310 IF N <2 THEN RETURN : REM THE LIST IS TOO SMALL TO SORT
320 FOR I = 2 TO N
330 FOR J = 1 TO I
340 IF D%(J) < = D%(I) THEN 360
350 T = D%(I):D%(I) = D%(J):D%(J) = T
360 NEXT J
370 NEXT I
380 RETURN