comp.lang.ada
 help / color / mirror / Atom feed
* “Parallel Sort” Program in Essence.
@ 2012-07-04  7:48 Austin Obyrne
  0 siblings, 0 replies; only message in thread
From: Austin Obyrne @ 2012-07-04  7:48 UTC (permalink / raw)



SUBTYPE Index_2 IS Integer RANGE 0 .. 1000009;
TYPE I_CoefficientsNumArray IS ARRAY(Index_2) OF Integer;
I_Num : I_CoefficientsNumArray := (others =>0); -- initialises array
-- places the numbers for sorting  in an array.

Data Collection.

Q := NextNum(I);
I_NUM(Q):= I_NUM(Q)+1;

Sorting.

FOR I IN 0  .. 1000000 LOOP  -- Sort Program proper starts here. 
  IF I_Num(I) /= 0 THEN
    Counter:= I_Num(I);
      FOR J in 1 .. Counter LOOP
        Ada.Integer_Text_IO.Put(File => Outdata, Item =>  (I));--
        Ada.Text_IO.New_Line;
        Check := Check +1;
        Sorted(Check):= I;
      END LOOP;
  END IF;
END LOOP;

Austin O'Byrne.

- adacrypt



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-07-04  7:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-04  7:48 “Parallel Sort” Program in Essence Austin Obyrne

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox