comp.lang.ada
 help / color / mirror / Atom feed
* tasking under ms-dos
@ 1997-10-24  0:00 A J Cornah
  1997-10-24  0:00 ` Larry Coon
  1997-10-25  0:00 ` Jerry van Dijk
  0 siblings, 2 replies; 9+ messages in thread
From: A J Cornah @ 1997-10-24  0:00 UTC (permalink / raw)



Probably a naive question but I would appreciate help.
I have obtained and installed the latest ez2load which gives me GNAT 3.07
and the documentation claims " .. It now includes tasking ... " but when I
try even a simple program like the one below which should interleaf As and Bs
I get all the As first then the Bs then my program freezes.

I used ADACAPS to compile it.

Thanks in advance.

tony


WITH TEXT_IO; USE TEXT_IO;

PROCEDURE   Ex2a   IS

  -- This is the worked answer to
  --     ACS313 Supervised Practical Sessions Example 2 a)
  
    c: CHARACTER;

TASK ProcedureA IS
    ENTRY Start;
END ProcedureA;

TASK ProcedureB IS
    ENTRY Start;
END ProcedureB;

TASK BODY ProcedureA IS
    count: integer;
BEGIN
    ACCEPT Start;
    FOR count IN 1..10 LOOP
        Delay 1.0;
        PUT("A");
    END LOOP;
    PUT_LINE(" ");
END ProcedureA;

TASK BODY ProcedureB IS
    count: integer;
BEGIN
    ACCEPT Start;
    FOR count IN 1..5 LOOP
        Delay 1.5;
        PUT("B");
    END LOOP;
    PUT_LINE(" ");
END ProcedureA;

BEGIN
    ProcedureA.Start;
    ProcedureB.Start;
END Ex2a;
\x1a





^ permalink raw reply	[flat|nested] 9+ messages in thread
[parent not found: <none>]

end of thread, other threads:[~1997-10-27  0:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-10-24  0:00 tasking under ms-dos A J Cornah
1997-10-24  0:00 ` Larry Coon
1997-10-24  0:00   ` A J Cornah
1997-10-24  0:00     ` Larry Coon
1997-10-25  0:00 ` Jerry van Dijk
1997-10-25  0:00   ` A J Cornah
     [not found] <none>
1997-10-26  0:00 ` Jerry van Dijk
1997-10-27  0:00   ` A J Cornah
1997-10-27  0:00     ` Robert Dewar

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