From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Path: eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Advent of Code Day 4 Date: Fri, 4 Dec 2020 19:25:05 +0100 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <348b76a7-0a9d-497c-94e7-cb822502d9b9n@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Fri, 4 Dec 2020 18:25:05 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="2c1d3936e9eca6b410e646d92338cb8e"; logging-data="16302"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/T54tMFqkirjAVPqq4wZXslNHWDz0CRKY=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 Cancel-Lock: sha1:RkdLgRWdM1ISyqSkxSWbHlIO1TY= In-Reply-To: <348b76a7-0a9d-497c-94e7-cb822502d9b9n@googlegroups.com> Content-Language: en-US Xref: reader02.eternal-september.org comp.lang.ada:60704 List-Id: On 12/4/20 5:16 PM, John Perry wrote: > I found this one tougher, in part because I've never done much text file processing, but also because the directions were very scant on the format of the entries, and I wasn't about to comb carefully through hundreds of entries to see what all the variations might be. > > I'll be very interested to see how different people read the file. Enumeration types are your friend. -- Jeff Carter "[O]ne can look forward to a rapid and widespread improvement in programming practice, both from those who use the language [Ada] and from those who study its concepts and structures." C. A. R. Hoare 181