with text_IO, calendar; procedure tasking is -- example of tasks outline:STRING(1..20):=(1..20=>' '); -- ABC and XYZ will have -- access to different parts -- of this array start_time:calendar.time:=calendar.clock; function "-"(Left,right:calendar.time) return duration renames calendar."-"; package dio is new TEXT_IO.FIXED_IO(num=>calendar.day_duration); generic POS:POSITIVE; procedure GP(C:CHARACTER); procedure GP(C:CHARACTER) is begin outline(POS):=C; text_io.put_line(outline); outline(POS):=' '; end; task ABC is end ABC; task XYZ is entry HITHERE; end XYZ; task body ABC is procedure P is new GP(10); begin P('A'); delay 7.0; P('B'); delay 4.0; XYZ.HITHERE; P('C'); delay 7.0; P('D'); delay 4.0; P('E'); end; task body XYZ is procedure P is new GP(15); begin P('X'); delay 3.0; P('Y'); delay 5.0; P('Z'); delay 3.0; accept HITHERE do null; end; P('x'); delay 5.0; P('z'); end; procedure P is new GP(1); begin for i in 1..30 loop dio.put(outline(1..7), calendar.clock - start_time, aft=>1); delay 1.0; end loop; end;