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 X-Google-Thread: a07f3367d7,dbbbb21ed7f581b X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news3.google.com!feeder.news-service.com!newsfeed.freenet.de!bolzen.all.de!newsfeed.ision.net!newsfeed2.easynews.net!ision!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Operation can be dispatching in only one type Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <025105f2-5571-400e-a66f-ef1c3dc9ef32@g27g2000yqn.googlegroups.com> <1wtsriaxu0s4s$.ikwnnz5teukp$.dlg@40tude.net> <1iipp3bn16fe2.yqa1gz1ru17a$.dlg@40tude.net> <18wh86jvjvoe0.cofxcc8udm6q$.dlg@40tude.net> <53a35ed9-88ac-43dc-b2a2-8d6880802328@j19g2000yqk.googlegroups.com> <4b091fb9$0$6567$9b4e6d93@newsspool4.arcor-online.net> <1w0q3zxzw79pt$.5z0juiky7kfd$.dlg@40tude.net> <0f177771-381e-493b-92bb-28419dfbe4e6@k19g2000yqc.googlegroups.com> <1nbcfi99y0fkg.1h5ox2lj73okx$.dlg@40tude.net> <59acf311-3a4a-4eda-95a3-22272842305e@m16g2000yqc.googlegroups.com> <4b150869$0$6732$9b4e6d93@newsspool2.arcor-online.net> Date: Tue, 1 Dec 2009 14:48:31 +0100 Message-ID: <18vlg095bomhd.8bp1o9yysctg$.dlg@40tude.net> NNTP-Posting-Date: 01 Dec 2009 14:48:31 CET NNTP-Posting-Host: b45a0262.newsspool1.arcor-online.net X-Trace: DXC=:3VQcd>7K1j;iVb[J9ZZP`ic==]BZ:afn4Fo<]lROoRa<`=YMgDjhgb3?5O9i]8UAo[6LHn;2LCVn7enW;^6ZC`dIXm65S@:3>o1;8f3iKWNVa X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:8267 Date: 2009-12-01T14:48:31+01:00 List-Id: On Tue, 01 Dec 2009 13:13:29 +0100, Georg Bauhaus wrote: > Then we could rely on the language: compilers will detect > uninitialized variables provided these do not have a pragma/keyword/... > to say that uninitialized is what the programmer wants. > Some fancy means to tell the compiler that this variable > does indeed have a good first value like pragma Import. > > X : [constant] Car; -- default init, The error is here! > -- undefined, > -- junk bits. Doesn't matter > -- *no* pragma Import (Ada, X); > > begin > > Spare := X.Tire (5); -- would become illegal, Not here! ------------------------- Anyway, you cannot do that because: if HALT (P) then X := Z; end if; Y := X; -- Is this legal? > Does the phrase "first value" make sense? An object shall not have invalid values. All values are valid if the language is typed. Enforcing user-defined construction including prohibition of certain kinds of construction (e.g. per default constructor) is a different story. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de