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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: buffer2.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!enother.net!enother.net!news.mixmin.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Georg Bauhaus Newsgroups: comp.lang.ada Subject: Re: Running a preprocessor from GPS? Date: Sat, 01 Aug 2015 22:30:48 +0200 Organization: A noiseless patient Spider Message-ID: References: <91f88d79-197c-419f-84a8-908e05967a2c@googlegroups.com> <135c2b00-d13c-4f5d-a586-8aca442d363b@googlegroups.com> <87380683vc.fsf@adaheads.sparre-andersen.dk> <347c6be9-c918-4bc0-9494-c93cd6740def@googlegroups.com> <4cb32c40-f659-490d-bbb6-73585fc069e8@googlegroups.com> <7e653a88-e690-431a-9df9-3fc691466e08@googlegroups.com> <25e8deb9-a967-4856-97cb-4257e1ba7fa4@googlegroups.com> <84debe67-b26c-40c6-93ae-a2dec28f081b@googlegroups.com> <87a8ualvt2.fsf@jester.gateway.sonic.net> Reply-To: nonlegitur@futureapps.de Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sat, 1 Aug 2015 20:29:11 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="d7230e03346f8acbb53b7169ad0d13b9"; logging-data="8694"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18k8tBFISegpDutCFrZcnw59HLhQTFVOzI=" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 In-Reply-To: <87a8ualvt2.fsf@jester.gateway.sonic.net> Cancel-Lock: sha1:/An0yZNm5v2q6JjcMJ57Ses3vT8= Xref: number.nntp.giganews.com comp.lang.ada:194614 Date: 2015-08-01T22:30:48+02:00 List-Id: On 01.08.15 20:15, Paul Rubin wrote: > "Jeffrey R. Carter" writes: >> The pkg is a very important concept in Ada, and your insistence that there has >> to be a Get_Instance function shows that you don't fully understand it yet. >> Until you do, you won't really understand Ada. > > Is there a good place to read about this? I had the impression that > package initialization runs unconditionally. EGarrulo was asking how to > get it to run only in response to a runtime request that might never > happen. I'm sneaking this in here. A generic instance has context, sometimes non-static context, on which it depends: with Ada.Text_IO; with Ada.Calendar; use Ada.Calendar; procedure Late is Start : Time; generic Now : Time; package Again is -- tells the time end Again; package body Again is begin Ada.Text_IO.Put_Line (Duration'Image (Now - Start)); end Again; begin Start := Clock; loop delay 1.0; declare package Tick is new Again (Now => Clock); begin null; end; end loop; end Late;