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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ae9506fd4dcf7090 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-10-22 07:43:37 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!news-fra1.dfn.de!news-koe1.dfn.de!RRZ.Uni-Koeln.DE!uni-duisburg.de!not-for-mail From: Georg Bauhaus Newsgroups: comp.lang.ada Subject: Re: Concatenation and Characters Date: Tue, 22 Oct 2002 14:43:37 +0000 (UTC) Organization: GMUGHDU Message-ID: References: <3ZTs9.1528$Bd4.11780@dfw-service2.ext.raytheon.com> NNTP-Posting-Host: l1-hrz.uni-duisburg.de X-Trace: a1-hrz.uni-duisburg.de 1035297817 6037 134.91.1.34 (22 Oct 2002 14:43:37 GMT) X-Complaints-To: usenet@news.uni-duisburg.de NNTP-Posting-Date: Tue, 22 Oct 2002 14:43:37 +0000 (UTC) User-Agent: tin/1.5.8-20010221 ("Blue Water") (UNIX) (HP-UX/B.11.00 (9000/800)) Xref: archiver1.google.com comp.lang.ada:30031 Date: 2002-10-22T14:43:37+00:00 List-Id: Lutz Donnerhacke wrote: : * Georg Bauhaus wrote: :> o.K. it is not built into the language, but a syntactically valid :> subprogram a la :> :> procedure fill(bowl: out glass; filled: out boolean); :> :> does inform readers about a potentially unsatisfying dring? : : It raises EDONTDRINKANDDRIVE. No it doesn't :) package drinks is EDONTDRINKANDDRIVE: exception; -- everyone knows this subtype up_to is float range 0.0..1.1365; -- filling glasses looks more honest in Britain type vessel is tagged record watermark: up_to := 0.0; end record; procedure refill(v: in out vessel); -- might raise EDONTDRINKANDDRIVE under some circumstances type glass is new vessel with null record; -- it's for humans, otherwise we might want saucers, buckets, troughs. -- (Or vats in case of a famous monk.) (Is it true that -- beer is served from tubs in some rural Irish pubs?) procedure fill(cupped: in out glass'class; filled: out boolean); -- `cupped` is filled iff `filled = true` on return end drinks; package body drinks is generous: constant := 0.9463; -- US bar keeper in continental Europe (that's -- _more_ than what you might get here, when comparing -- liquid level to glass height.) must_drive_home: constant boolean:= false; -- an accidential circumstance of life procedure refill(v: in out vessel) is begin if must_drive_home then raise EDONTDRINKANDDRIVE; end if; v.watermark := generous; end refill; procedure fill (cupped: in out glass'class; filled: out boolean) is begin refill(cupped); filled := true; exception -- ... when others => -- including EDONTDRINKANDDRIVE: filled := false; end fill; end drinks; -- georg