from element number 125 to element number S27 inclusive by ID
Nowy then we can use something like.
100 F=4251L0327-125+11 Det
118 AUSR (@) DAS(F) ,L41,8,D
Double dimensioned arrays are not supported but...
A=USR(@) ,DDS (1,1) ,50,1,12,5
Wi11 sort the array from DDs(1,1) to DDS(S®,1) without reference
to any other dimensions. ie. the elements DDs(1,2) to DDS(52,2)
will remain in their previous sequence. Perhaps BruteSort ‘IT
Sill “properly support milti-dimensioned arrays but I can
Visualise the 1000 element sort dragging on for quite a bit
Tonger mith that enhancement.
The penalty paid for having auch brief cade is that there t
no validation of the parameters and it’s also fussy about syntax
(extra blants, etc. J. [ts up to the BASIC calling program to
check that’ ail. parameters are within valid range. Another
limitation is that all the elements in the array should have
characters filling the entire sort field Sorting field 1 to. 10
on a 6 character string may have unpredictable results and an
array with a null string in the sort range will most likely get
corrupted.
With some more understanding of how BASIC works the routine
could be polished up a bit to remove these restrictions. Who is
going to be first with Suavesort?
T would be glad to hear from any other Nascomaniacs in Saudi
Prabia (or anvuhere elwe for that matter). T can be contacted
LR, Meatee
C/o Sait Establishment
Poa, Box 927
ai-khobar
Saude arabia
100 REM DEMOSHRT DEMO PROGRAM FOR BRUTESORT
110 REM
140 A=DEFY \- 24576) +DEEK (24500) +DEEK (-24400)
150 1F f= tazed THEN 230
16@ 23276 0G0SUB 1128:REM LOAD BRUTESORT
170 REN
170 REN 1OF OF NEMORY MUST HAVE BEEN SET TO
“2@ FEM AQROH Nis BASIC INITIALISATION
21a Fem
P38 CLEAR TAOMA: HOE 4100,-24576:REM ABBBH
Dag TTs="URNS0R TED <--> SORTED”
PSO DaO:REM | WILL RETURN DESCENDING SORT
2e@ REM
278 11 52SU REFN 1% 72INEUT Hose many words “16
28@ NuM=VAL Oot TE NUMGL OR NUM>1@@ THEN 278
Fage 19