90 CLEAR 1000					'ALLOCATE STRING STORAGE
100 DIM A$(19)					'ALLOCATE UNSORTED ARRAY
200 DIM B$(19)					'ALLOCATE WORKING ARRAY
300 FOR I = 0 TO 19				    'SETUP LOOP FOR INITIALIZATION
400 READ C$					    'READ DATA ITEM
500 A$(I) = C$					    'STORE IN ARRAY
600 B$(I) = "****"					    'MARK B$ ARRAY ENTRY UNUSED
700 NEXT I					    'LOOP
1000 K = 0					'INITIALIZE B$ INDEX
1100 FOR I = 0 TO 19				   'OUTER LOOP FOR NEXT ENTRY
1700 IF A$(I) = "****" GOTO 2500			   'GO IF UNUSED
1800 FOR J = I TO 19				       'OUTER LOOP FOR NEXT ENTRY
1900 IF A$(J) = "****" GOTO 2100			       'GO IF UNUSED
2000 IF A$(J)  < A$(I) THEN I = J			       'NEW SMALLIST
2100 NEXT J					       'LOOP
2200 B$(K) = A$(I)					'MAKE ENTRY IN B$
2300 A$(I) = "****"					'MARK AS UNUSED
2400 K = K+1					'BUMP B$ INDEX
2405 CLS					'CLEAR SCREEN
2410 PRINT "A$ ARRAY",,"B$ ARRAY"
2415 FOR L = 0 TO 19				    'LOOP FOR DISPLAY
2420 PRINT A$(L),,B$(L)				    'PRINT CONTENTS OF ARRAYS
2425 NEXT L					    'LOOP
2430 I = -1					'START FROM BEGINNING
2500 NEXT I					'GO FOR NEXT ENTRY
2600 PRINT "SORT DONE"
3000 DATA "ELECTRON","LA SMOG","DIAMOND","PEA","MARBLE"
3100 DATA "#3 BEARING","FABERGE EGG","BASEBALL","ORANGE","BOWLING BALL"
3200 DATA "BALLON","BALL OF STRING","747 TIRE","DOUGHNUT","GOODYEAR BLIMP"
3300 DATA "PERSPHERE","RAMA","PHOBOS","MARS","EARTH"
