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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.mixmin.net!news.albasani.net!reality.xs3.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: Tero Koskinen Newsgroups: comp.lang.ada Subject: Re: Length-Limited Huffman Coding Date: Thu, 11 Feb 2016 20:44:03 +0200 Organization: JSA Research & Innovation Message-ID: References: <7ce6d977-8656-4676-9e66-391473251513@googlegroups.com> <3353c34e-b11d-42fe-83d2-85781276c0e2@googlegroups.com> <2bdea64f-0f90-4f89-93d8-fafe2e93e3a9@googlegroups.com> NNTP-Posting-Host: 188-67-82-50.bb.dnainternet.fi Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: loke.gir.dk 1455216235 22856 188.67.82.50 (11 Feb 2016 18:43:55 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Thu, 11 Feb 2016 18:43:55 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 In-Reply-To: <2bdea64f-0f90-4f89-93d8-fafe2e93e3a9@googlegroups.com> Xref: news.eternal-september.org comp.lang.ada:29496 Date: 2016-02-11T20:44:03+02:00 List-Id: 11.2.2016, 11.48, gautier_niouzes@hotmail.com wrote: >>> builds on GNAT with the -gnat83 switch, so *perhaps* with all Ada >>> compilers!... > > Randy: > >> Careful! You might talk me into digging out an old Janus/Ada 83 for MS-DOS. >> :-) > > Teasing, isn't it ? Will you resist ? I am not Randy, but I tested the code with Janus/Ada 3.1.2c (on Windows 10) and it compiled and ran fine: > test_llh Maximum Huffman code length (constraint): 4 bits ------------------------------------ a freq = 10 length = 4 b freq = 30 length = 2 c freq = 12 length = 4 d freq = 5 length = 4 e freq = 17 length = 3 f freq = 20 length = 3 g freq = 17 length = 3 h freq = 0 length = 0 i freq = 20 length = 3 j freq = 0 length = 0 k freq = 15 length = 4 Maximum Huffman code length (constraint): 5 bits ------------------------------------ a freq = 10 length = 5 b freq = 30 length = 2 c freq = 12 length = 4 d freq = 5 length = 5 e freq = 17 length = 3 f freq = 20 length = 3 g freq = 17 length = 3 h freq = 0 length = 0 i freq = 20 length = 3 j freq = 0 length = 0 k freq = 15 length = 3 > Although, Janus/Ada gave one warning: In File C:\Work\gautier\llhc\LENGTH_LIMITED_HUFFMAN_CODE_LENGTHS.ADB at line 54 -------------- 53: type Index_pair is array(Index_type'(0)..1) of Index_type; 54: lists: array(0..Index_type(max_bits-1)) of Index_pair; -----------------------------------------------------^ *WARNING* This component has a non-simple type (6.5.2) %%%%%%% Yours, Tero