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,782d6c8a12248b09 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!postnews.google.com!v28g2000hsv.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Ada Recursion with strings Date: Wed, 1 Oct 2008 07:29:48 -0700 (PDT) Organization: http://groups.google.com Message-ID: <758a1a91-7521-4ad3-9af0-a79d434ae60e@v28g2000hsv.googlegroups.com> References: <2fJEk.367687$yE1.299201@attbi_s21> 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 1222871389 24552 127.0.0.1 (1 Oct 2008 14:29:49 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 1 Oct 2008 14:29:49 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: v28g2000hsv.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:2187 Date: 2008-10-01T07:29:48-07:00 List-Id: On Oct 1, 4:34 am, "Jeffrey R. Carter" wrote: > Robert A Duff wrote: > > > Do you really think that's useful in this case, where 2**8 > > appears several times close together? What would you call > > that named number -- Two_To_The_Eighth? > > I'd probably do > > Bits_Per_Byte : constant := 8; > Values_Per_Byte : constant := 2 ** Bits_Per_Byte; Yep, the advantage of that is that if the people who design the Internet communication protocols suddenly decide that IP addresses are going to use 9-bit bytes, all you have to do is change one constant, rather than try to find all the 8's in your code and change them, which is more error-prone. -- Adam