comp.lang.ada
 help / color / mirror / Atom feed
From: Jeffrey Carter <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: Breadth First Search Missionaries and Cannibals
Date: Tue, 30 Apr 2013 10:20:20 -0700
Date: 2013-04-30T10:20:20-07:00	[thread overview]
Message-ID: <klouac$cs9$2@dont-email.me> (raw)
In-Reply-To: <517f7917$0$9507$9b4e6d93@newsspool1.arcor-online.net>

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



      parent reply	other threads:[~2013-04-30 17:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-30  2:48 Breadth First Search Missionaries and Cannibals Alex
2013-04-30  7:56 ` Georg Bauhaus
2013-04-30 10:29   ` Alex
2013-04-30 13:37     ` Will Koch
2013-04-30 17:20   ` Jeffrey Carter [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox