DataMuseum.dk

Presents historical artifacts from the history of:

CP/M

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

See our Wiki for more about CP/M

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦2d454d3e1⟧ TextFile

    Length: 640 (0x280)
    Types: TextFile
    Names: »BINOM1.PAS«

Derivation

└─⟦f983c2ef3⟧ Bits:30004681 Pascal opgaver (Butler)
    └─⟦this⟧ »BINOM1.PAS« 

TextFile


              FOR i:= venstre + 1 TO hoejre DO
                BEGIN
                  naeste := vektor(.i.); (* naeste skal på plads *) 
                  v := venstre;
                  h := i - 1;
                  WHILE v <= h DO
                    BEGIN
                      midt := (v + h) DIV 2;
                      IF naeste < vektor(.midt.)
                        THEN h := midt - 1
                        ELSE v := midt + 1;
                    END; (* WHILE *)
                  FOR j := i - 1 DOWNTO v DO
                    vektor(.j + 1.) := vektor(.j.);
                  vektor(.v.) := naeste;