From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,aca1bba1a3bdebe0 X-Google-Attributes: gid103376,public From: eachus@spectre.mitre.org (Robert I. Eachus) Subject: Re: Help needed with tasking Date: 1996/05/22 Message-ID: #1/1 X-Deja-AN: 156200442 references: <31A33519.41C67EA6@diana1.cs.paisley.ac.uk> organization: The Mitre Corp., Bedford, MA. newsgroups: comp.lang.ada Date: 1996-05-22T00:00:00+00:00 List-Id: In article <31A33519.41C67EA6@diana1.cs.paisley.ac.uk> Richard Francis writes: > I am writing a traffic lights sim using tasking. Can someone help me > with how tasks work? You can't call an entry from within another, is > that right? Why not? There is a rule in both Ada 83 and Ada 95 that you can't have an accept statement nested inside another accept statement for the same entry, but that's all. (Well, Ada 83 had a "helpful" note RM839.5(21), which probably caused more confusion than help. Most of the note is gone from Ada 95.) > what else can or can't you do? Good question. The answer used to be that you couldn't have the same task queued calling two different entries, but Ada 95 fixed that. (See RM95 9.7.4) And yes I know that there is an equivalent implementation that doesn't break the Ada 83 rule, but from the programmer's point of view you can queue up for as many other entries as you want. ;-) -- Robert I. Eachus with Standard_Disclaimer; use Standard_Disclaimer; function Message (Text: in Clever_Ideas) return Better_Ideas is...