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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b50bc6538a649497 X-Google-Attributes: gid103376,public From: John English Subject: Re: if statements Date: 2000/11/08 Message-ID: <3A09456E.D1F1D3A2@bton.ac.uk>#1/1 X-Deja-AN: 691185962 Content-Transfer-Encoding: 7bit References: <3A02CED4.520C2768@brighton.ac.uk> <3A078B6F.D34B024B@erols.com> <8mTN5.7821$pq3.603668@news.flash.net> <3A0824BB.14ACCA12@bton.ac.uk> <8ua3s1$c4t$1@nnrp1.deja.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: news@bton.ac.uk X-Trace: saturn.bton.ac.uk 973686150 11270 193.62.183.204 (8 Nov 2000 12:22:30 GMT) Organization: University of Brighton Mime-Version: 1.0 NNTP-Posting-Date: 8 Nov 2000 12:22:30 GMT Newsgroups: comp.lang.ada Date: 2000-11-08T12:22:30+00:00 List-Id: Robert Dewar wrote: > > In article <3A0824BB.14ACCA12@bton.ac.uk>, > John English wrote: > > Unfortunately this sort of question gets marked by an > > automated system, so the robotic instructor in question will, > > I'm afraid, be deeply unimpressed. ;-) > > It's a shame when only a dumb answer is accepted. In particular > I assume your robot would not know about the xor solution, > which is in some sense the best. There are of course > interesting solutions at the machine language level that > do not require any jumps which are always fun :-) You misunderstand. The robot embeds submitted assignment statements in a test program, runs the result against a set of test cases, and checks that the output is correct wrt a standard solution. So it would be quite happy with the xor solution, too. The reference to the robot being unimpressed is merely to do with the fact that I haven't yet managed to program a sense of aesthetics into it. If anyone has a solution to that, *I'd* be deeply impressed... :-) ----------------------------------------------------------------- John English | mailto:je@brighton.ac.uk Senior Lecturer | http://www.it.bton.ac.uk/staff/je Dept. of Computing | ** NON-PROFIT CD FOR CS STUDENTS ** University of Brighton | -- see http://burks.bton.ac.uk -----------------------------------------------------------------