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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,6689542a60dbcc55 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!news3.google.com!feeder.news-service.com!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: Discriminated records are not the most efficient, but ... Date: Mon, 23 Aug 2010 08:25:59 +0200 Organization: Adalog Message-ID: References: <874oemcr37.fsf@mid.deneb.enyo.de> <4c71e5fc$0$2388$4d3efbfe@news.sover.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Mon, 23 Aug 2010 06:26:02 +0000 (UTC) Injection-Info: mx03.eternal-september.org; posting-host="z/xN1DBP8RUb+r9ug/i0hg"; logging-data="21310"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+F0ya9bbToajvC+9s+tJZ6" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 In-Reply-To: Cancel-Lock: sha1:8aahxeqnkCu3MLI8Km8X9QLsLss= Xref: g2news1.google.com comp.lang.ada:13646 Date: 2010-08-23T08:25:59+02:00 List-Id: Le 23/08/2010 05:50, Yannick DuchĂȘne (Hibou57) a Ă©crit : > So task or protected are compilation_unit... only when separate ? So > what makes it not a compilation_unit when not separate ? > > Unless I am missing something else, this seems strange to me. > Don't be fooled by the word "unit". In Ada, you have program units and compilation units, and they are orthogonal. -Program unit: a logical unit that can have behaviour (i.e. statements). -Compilation unit: something that can be given to the compiler without being nested into something else. For example, a package is one program unit. It is made of two parts, spec and body, where each is a compilation unit (can be compiled separately). A task is a type, not a module. Therefore, it is a program unit, not a compilation unit. However, any separate body can be compiled separately (of course!), and is a compilation unit. -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr