comp.lang.ada
 help / color / mirror / Atom feed
From: lynx.cs.washington.edu!szamos@beaver.cs.washington.edu  (Szamos)
Subject: problem with separate task body
Date: 18 May 93 20:10:45 GMT	[thread overview]
Message-ID: <1993May18.201045.24811@beaver.cs.washington.edu> (raw)

I'm having some problem to make a separate task body.
 
Given the following short example code:
  PROCEDURE Main;
     testvar : INTEGER; 

  TASK One IS
     Entry First;
  END One;

  TASK BODY One IS
  BEGIN 
     --  whatever 
  END;

  TASK Two IS
  END Two;

  TASK BODY Two IS
  BEGIN
     --   some code
     testvar := 1;
     One.First;
     --  etc.
   END Two;

   BEGIN
     NULL;
   END;

This code *compiles* and work fine.   But when I try to use subunits, so 
I can have the BODYs in in different files I ran into a problem.

Given the previous code with the following change:

   TASK BODY Two IS SEPARATE;
   -- body omitted here

   BEGIN
      NULL;
   END Main;

and having a separate unit:

SEPARATE (Main)
TASK BODY Two IS
BEGIN
   ---  code
  testvar := 1;
  One.First;
  ---  more code
END Two;

when I try to compile this subunit I get the following:
   One.First;
---^
A:error: RM 8.3: identifier undefined

I tried everything I could, (ie: DECLARE) to no avail.   And only the 
entry points are not visible, ordinary variables (ie: testvar) do not
gave me the error.

So, anyone has any idea how to get around this problem?

Thanks,
    Janos 

             reply	other threads:[~1993-05-18 20:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-05-18 20:10 Szamos [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-05-18 21:39 problem with separate task body Kenneth Anderson
replies disabled

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