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: a07f3367d7,af4868d4b196fa50 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.66.13.3 with SMTP id d3mr5646276pac.40.1367665513084; Sat, 04 May 2013 04:05:13 -0700 (PDT) Path: bp1ni1514pbd.1!nntp.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!nrc-news.nrc.ca!News.Dal.Ca!news.litech.org!news.stack.nl!eternal-september.org!feeder.eternal-september.org!mx05.eternal-september.org!.POSTED!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: Breadth First Search Missionaries and Cannibals Date: Tue, 30 Apr 2013 10:20:20 -0700 Organization: Also freenews.netfront.net; news.tornevall.net Message-ID: References: <6c3bb45c-6cb1-4609-9c3f-c3f01c545eac@googlegroups.com> <517f7917$0$9507$9b4e6d93@newsspool1.arcor-online.net> Mime-Version: 1.0 Injection-Date: Tue, 30 Apr 2013 17:17:02 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="656ea2f23126f57fb36504d2d15a002c"; logging-data="13193"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19gT45FYEbxucIWwsIOm2t1IiEpsb3phN0=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 In-Reply-To: <517f7917$0$9507$9b4e6d93@newsspool1.arcor-online.net> Cancel-Lock: sha1:7FDMyZPzvt/54YsPM6BBsM9UpZo= X-Received-Bytes: 2346 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Date: 2013-04-30T10:20:20-07:00 List-Id: On 04/30/2013 12:56 AM, Georg Bauhaus wrote: > > While this does not address the combinatorial part, if modern IT > is permitted to be built atop vague, implementation defined > types stuck in the 1970s (Integer), why not boldly move on to the > 1980s and turn the assumption "all are >= 2" into a rock solid type? > > type Entity_Count is range 2 .. Max_Possible_Number; > > function Min_Crossings(M, C, R : Entity_Count) return ... > > If the suffix of Entitiy_Count hides too much information ("Is this an int, > actually?") in the context of an algorithmic exercise, you could call it > Entity_int. It's pretty clear that these are homework problems, and the subprogram declaration is provided by the instructor, who for some reason is not using subtypes or user-defined types. -- Jeff Carter "Strange women lying in ponds distributing swords is no basis for a system of government." Monty Python & the Holy Grail 66