DataMuseum.dk

Presents historical artifacts from the history of:

RegneCentralen RC759 "Piccoline"

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about RegneCentralen RC759 "Piccoline"

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦8f515f4d6⟧ TextFile

    Length: 896 (0x380)
    Types: TextFile
    Names: »SORTER.SCL«

Derivation

└─⟦216f59cd8⟧ Bits:30002641 SCANLOG - Piccoline vers. nov. 87
    └─ ⟦this⟧ »SORTER.SCL« 

TextFile

; Jan Rubæk Pedersen 1.Juli 1985
;
; Hurtigsortering. Kan sortere en liste af strenge eller tal.
;
; Hvis man ønsker at sortere andet, f.eks. lister, skal reglen for
; orden laves om.
;
; Kaldes paa formen
;         find alle Svar saa sorter(<4,56,7,12,3>,Svar)
vælg_een sorter
  sorter(<X..Y>,S) hvis 
       split(X,Y,A,B),
       sorter(A,S1),
       sorter(B,S2) og 
       konkatener(S1,<X..S2>,S).
  sorter(<>,<>).
slut.
vælg_een konkatener
  konkatener(<X..Y>,L,<X..Z>) hvis 
       konkatener(Y,L,Z).
  konkatener(<>,L,L).
slut.
split(Element,<A..Hale1>,<A..Hale2>,L) hvis 
     orden(A,Element) og 
     split(Element,Hale1,Hale2,L).
split(Element,<A..Hale1>,L,<A..Hale2>) hvis 
     ikke(orden(A,Element)) og 
     split(Element,Hale1,L,Hale2).
split(Element,<>,<>,<>).
orden(A,B) hvis 
     A < B.
«eof»