* Ada-Trivial Problem
@ 1997-02-28 0:00 Duncan Woodward
0 siblings, 0 replies; only message in thread
From: Duncan Woodward @ 1997-02-28 0:00 UTC (permalink / raw)
Im a first year comp sci student in glasgow scotland.
what i would like help on is a example prog that shows two procedures
running concurrently using tasking.
The procedures are sorts, however whilst they work they dont run
concurrently....why?
with list_operations; use
list_operations;
procedure SORT(LIST: in ARRAY_OF_INTEGER) is
procedure Insertion_Sort (List : in out ARRAY_OF_INTEGER);
procedure Selection_Sort (List : in out ARRAY_OF_INTEGER);
task SORT1;
task SORT2;
task body SORT1 is
max:integer:=45;
Data:array_of_integer(1..Max):=List;
begin
INSERTION_SORT(Data);
end SORT1;
task body SORT2 is
max:integer:=45;
Data:array_of_integer(1..Max):=List;
begin
SELECTION_SORT(Data);
end SORT2;
----------------------
procedure swap (left, right : in out INTEGER) is
--statements--
end swap;
-------------------
procedure Insertion_Sort (List : in out ARRAY_OF_INTEGER) is
-- statements--
end Insertion_Sort;
----------------------
procedure Selection_Sort (List : in out ARRAY_OF_INTEGER) is
--statements--
end Selection_Sort;
-----------------------
begin
LIST_OPERATIONS.DISPLAY("drdw",23);
end SORT;
---------------------------
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1997-02-28 0:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-02-28 0:00 Ada-Trivial Problem Duncan Woodward
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox