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,5b18a5a233d3f64b X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.germany.com!newsfeed-0.progon.net!progon.net!news-zh.switch.ch!switch.ch!news.ip-plus.net!newsfeed.ip-plus.net!news.post.ch!not-for-mail From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: Ann: UnZip-Ada v.20 Date: Mon, 19 Mar 2007 14:19:53 +0100 Organization: Swisscom IP+ (post doesn't reflect views of Swisscom) Message-ID: <45fe8dfa$1@news.post.ch> References: <45fa9823$1_4@news.bluewin.ch> <45fabc52$0$192$edfadb0f@dread11.news.tele.dk> <45fad3af$1_6@news.bluewin.ch> <45fb9e15$1_4@news.bluewin.ch> <1174303820.108064.43930@e1g2000hsg.googlegroups.com> NNTP-Posting-Host: 194.41.146.1 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: atlas.ip-plus.net 1174310398 2798 194.41.146.1 (19 Mar 2007 13:19:58 GMT) X-Complaints-To: abuse@ip-plus.net NNTP-Posting-Date: Mon, 19 Mar 2007 13:19:58 +0000 (UTC) User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) In-Reply-To: X-Original-NNTP-Posting-Host: w01iwt.pnet.ch X-Original-Trace: 19 Mar 2007 14:19:54 +0200, w01iwt.pnet.ch Xref: g2news1.google.com comp.lang.ada:14556 Date: 2007-03-19T14:19:53+01:00 List-Id: Jacob Sparre Andersen schrieb: > Harald Korneliussen found the code: > >> -- Codes for methods >> >> stored: constant:= 0; >> shrunk: constant:= 1; >> reduced_1: constant:= 2; >> reduced_2: constant:= 3; >> reduced_3: constant:= 4; >> reduced_4: constant:= 5; >> imploded: constant:= 6; >> deflated: constant:= 8; >> >> SupportedMethods: constant:= >> 2 ** stored + 2 ** shrunk + >> 2 ** reduced_1 + 2 ** reduced_2 + >> 2 ** reduced_3 + 2 ** reduced_4 + >> 2 ** imploded + >> 2 ** deflated; > > Looks like something I might write: > > type Method_Codes (Stored, > Shrunk, > reduced_1, > reduced_2, > reduced_3, > reduced_4, > imploded, > deflated); for Method_Codes use ( Stored: => 0, Shrunk: => 1, Reduced_1: => 2, Reduced_2: => 3, Reduced_3: => 4, Reduced_4: => 5, Imploded: => 6, Deflated: => 8); > type Method_Support is array (Method_Codes) of Boolean; > pragma Pack (Method_Support); > > Supported_Methods : constant Method_Support := (others => True); > > Any reason not to do it like this? Can't think of any. Martin