BBS: Inland Empire Archive Date: 12-07-92 (15:18) Number: 373 From: ROB MCKEE Refer#: NONE To: SHANE HEADER Recvd: NO Subj: Re: Alphabetizer FUNCTION Conf: (2) Quik_Bas
Hi Shane SH> Does anyone have a FUNCTION that that will alphabatize a complete SH> string array? I have tried unsucessfuly. I'm sure I could do it, but I SH> thought I would check with you guys to see if you had one lying around. If the Array isn't to big a Bubble sort will do it. DECLARE FUNCTION StringArraySort (Array$(),lb%,Ub%) DEFINT a-z FUNCTION StringArraySort (Array$(),lb%,Ub%) ' Use only where Ub%-Lb%<30 DO flip=0 for t=lb% to Ub%-1 if Ucase$(array$(t)) > UCASE$(array$(t+1)) then swap array$(t) , array$(t+1) flip=1 end if next t LOOP while flip END FUNCTION I used to have a Key/step sort routine but the Bit bucket ate it.. TTYL -Rob ------------------------------ 8< --------------------------- --- EZPoint V2.1 * Origin: Flyer Proof Computer Services V# 510-237-8091 (1:125/1212.13)
Books at Amazon:
Back to BASIC: The History, Corruption, and Future of the Language
Hackers: Heroes of the Computer Revolution (including Tiny BASIC)
Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution
The Advent of the Algorithm: The Idea that Rules the World
Moths in the Machine: The Power and Perils of Programming
Mastering Visual Basic .NET