comp.lang.ada
 help / color / mirror / Atom feed
From: "Marin David Condic" <marin.condic.auntie.spam@pacemicro.com>
Subject: Re: Multiple entry tasks
Date: Wed, 18 Apr 2001 12:22:10 -0400
Date: 2001-04-18T16:22:11+00:00	[thread overview]
Message-ID: <9bkevj$61k$1@nh.pace.co.uk> (raw)
In-Reply-To: slrn9dralj.k4.lutz@taranis.iks-jena.de

Sounds like you want some version of guarded entries in a select statement.
I have not attempted to do this before (kids: don't try this at home - we
*are* trained professionals!), nor have I run this past a compiler (spank me
for this later if it doesn't work) but I *think* you want some version of
the following:

select
    when (Entry2'Count <= 0) and (Entry1'Count <= 0) =>
        accept Entry3 ;
    when (Entry1'Count <= 0) =>
        accept Entry2 ;
or
    accept Entry1;
else
    terminate;
end select ;

Let me know if a) some variation of this compiles and b) it does what you
intended...

MDC
--
Marin David Condic
Senior Software Engineer
Pace Micro Technology Americas    www.pacemicro.com
Enabling the digital revolution
e-Mail:    marin.condic@pacemicro.com
Web:      http://www.mcondic.com/


"Lutz Donnerhacke" <lutz@iks-jena.de> wrote in message
news:slrn9dralj.k4.lutz@taranis.iks-jena.de...
> Simple problem, but no clue:
>
> I have a task with multiple entry points. I'd like to serve some entries
> before the rest and like to have a terminate alternative. How should I
solve
> this? (Currently I added a protected type and used it, but this violates
the
> encapsulation)





  reply	other threads:[~2001-04-18 16:22 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-18 14:57 Multiple entry tasks Lutz Donnerhacke
2001-04-18 16:22 ` Marin David Condic [this message]
2001-04-18 18:12   ` Ted Dennison
2001-04-18 18:57     ` Ted Dennison
2001-04-18 20:16       ` Marin David Condic
2001-04-19 14:02         ` Ted Dennison
2001-04-19 14:28           ` Marin David Condic
2001-04-18 19:46     ` Marin David Condic
2001-04-19 21:52       ` Robert A Duff
2001-04-24  9:19         ` Lutz Donnerhacke
2001-04-19  8:17   ` Jean-Pierre Rosen
2001-04-19 14:42     ` Ted Dennison
2001-04-19 15:01       ` Marin David Condic
2001-04-19 15:02       ` Jean-Pierre Rosen
2001-04-19 19:12         ` Ted Dennison
2001-04-20 14:17           ` Jean-Pierre Rosen
2001-04-20 19:04             ` Ted Dennison
2001-04-23  6:55               ` Jean-Pierre Rosen
2001-04-23 13:50                 ` Ted Dennison
replies disabled

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