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,99e73f65ea2533b9 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!postnews.google.com!z6g2000pre.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: and then... (a curiosity) Date: Tue, 2 Sep 2008 07:50:12 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <18b41828-bda4-4484-8884-ad62ce1c831d@f36g2000hsa.googlegroups.com> <874p53bij6.fsf@willow.rfc1149.net> <94cc1ce3-59d1-41fa-9167-f3b60ddd2835@a1g2000hsb.googlegroups.com> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1220367012 32082 127.0.0.1 (2 Sep 2008 14:50:12 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 2 Sep 2008 14:50:12 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: z6g2000pre.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.7.12-1.3.1,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:1867 Date: 2008-09-02T07:50:12-07:00 List-Id: On Aug 30, 2:28 pm, Maciej Sobczak wrote: > On 29 Sie, 23:47, Samuel Tardieu wrote: > > > Sometimes, you want to ensure that both sides of the boolean operator > > have been evaluated. Here is an example: > > > -- Send the message to the log and return True if it > > -- has been logged at least at one place succesfully. > > > function Log (Message : String) return Boolean is > > begin > > return Log_To_Network (Message) or Log_To_Disk (Message); > > end Log; > > This is actually a bad example. It might use "or else" and still > retain the semantics as described in the comment above. I don't think the example is bad at all, but the comment might be ambiguous. I understood Samuel's point to be that the function logs to the network if possible, and it logs to disk if possible---ideally it should log to both places, but we're hoping it logs to at least one. If you use "or else" it will never log to both. That apparently isn't what is desired. -- Adam