Data update

This commit is contained in:
Ingy döt Net 2026-02-01 16:33:20 -08:00
parent 5150844a7d
commit 4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions

View file

@ -1,14 +0,0 @@
package Tables is
type Table is private;
type Ordering is (Lexicographic, Psionic, ...); -- add others
procedure Sort (It : in out Table;
Order_By : in Ordering := Lexicographic;
Column : in Positive := 1;
Reverse_Ordering : in Boolean := False);
private
... -- implementation specific
end Tables;

View file

@ -1,10 +0,0 @@
with Tables;
procedure Table_Test is
My_Table : Tables.Table;
begin
... -- insert stuff in table
Sort (My_Table); -- use default sorting
Sort (My_Table, Psionic, 5, True); -- use psionic sorting by 5th column in reverse order
Sort (It => My_Table, Reverse_Ordering => True); -- use default sorting in reverse order
... -- other stuff
end Table_Test;

View file

@ -1,11 +1,9 @@
sortTable: function [tbl][
column: "0"
reversed?: false
unless null? c: <= attr 'column -> column: to :string c
unless null? attr 'reverse -> reversed?: true
reversed?: (attr 'reverse)?? false
column: to :string (attr 'column)?? 0
result: new sort.by: column map tbl 'r [
to :dictionary flatten couple 0..dec size r r
result: sort.by: column map tbl 'r [
to :dictionary flatten couple @ 0..dec size r r
]
if reversed? -> reverse 'result

View file

@ -1,23 +0,0 @@
sortStrings: procedure expose @. /*the stemmed array is named: @. */
col= 1 /*set some defaults (here and below). */
reverse= 'NO'
order= 'LEXICOGRAPHIC'
arg options /*obtain the options (in uppercase). */
do j=1 for words(options) /*examine all the words (options). */
x= word(options, j)
select
when datatype(x, 'W') then col= x / 1 /*normalize the number. */
when pos('=', x)==0 then order= x /*has it an equal sign? */
otherwise parse var x nam '=' value /*get value.*/
end /*select*/
end /*j*/
/*╔═══════════════════════════════════════════════════════════╗
check for errors here: COL isn't a positive integer ···,
REVERSE value isn't NO or YES,
ORDER value is recognized ···
*/
... main body of string sort here ...
return /*stick a fork in it, we're all done. */

View file

@ -1,8 +0,0 @@
/*REXX example uses the SortStrings subroutine with some (passed) optional arguments. */
@.1= 'one'; @.2= "two"; @.3= 'three' /*define an array (@.) of strings here.*/
call sortStrings 'Reverse=no' 3
/*stick a fork in it, we're all done. */