Hi!

I read the Wiki about this article, it's looks like very complicated for me. :-(
Can anybody show me a very simple example?
Below is a code, i would like to run it multithread both under Windows
and Linux.

Program Sorting;
const
        n = 999000;
var
        data : array [1..n] of integer;
        i, j, t: LongInt;
begin
                for i := 1 to n do
                        data[i]:=random(32768);
                for i := 1 to n-1 do
                begin
                        for j:=i+1 to n do
                        begin
                                if data[i]<data[j] then
                                begin
                                        t:=data[i];
                                        data[i]:=data[j];
                                        data[j]:=t;
                                end;
                        end;
                end;
end.

Best regards, G
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to