comp.lang.ada
 help / color / mirror / Atom feed
From: Robert Dewar <robert_dewar@my-deja.com>
Subject: Re: Exit Loop_Statement
Date: 2000/05/09
Date: 2000-05-09T00:00:00+00:00	[thread overview]
Message-ID: <8f91ps$vb3$1@nnrp1.deja.com> (raw)
In-Reply-To: 3917C83E.D088C4DF@bton.ac.uk

In article <3917C83E.D088C4DF@bton.ac.uk>,
  John English <je@bton.ac.uk> wrote:
> That should be Clients(1..4), right?

Well yes, of course, and of course we all saw that. But don't
you think it is instructive for people to find a bug like that
for themselves. I preferred the previous post which gave a
useful pointed hint (think about whether this will ever be
true), to this one that provides the correction directly.

A hard part of computer programming is figuring out why what
you have written does not work, and learning to be careful
and avoid writing such things in the first place. Practice
is really essential in this task. The purpose of assignments
is to provide this practice, and you have to be careful that
in an attempt to be helpful you do not bypass this very
important function.

> You should convert to e.g. lower case if you want case
> insensitivity:
>   if Ada.Characters.Handling.To_Lower(Clients(1..4)) = "stop"
> then ...

Again, I would point to the reference for this routine, rather
than give the exact code, which the student can then just cut
and paste without any understanding.




Sent via Deja.com http://www.deja.com/
Before you buy.




  reply	other threads:[~2000-05-09  0:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-09  0:00 Exit Loop_Statement David Freshwater
2000-05-09  0:00 ` Gautier
2000-05-09  0:00   ` Robert Dewar
2000-05-09  0:00 ` Ken Garlington
2000-05-09  0:00 ` John English
2000-05-09  0:00   ` Robert Dewar [this message]
2000-05-09  0:00     ` John English
2000-05-09  0:00       ` John English
2000-05-09  0:00         ` Robert Dewar
2000-05-09  0:00     ` David Freshwater
2000-05-09  0:00       ` DuckE
2000-05-10  0:00 ` Jeff Creem
2000-05-10  0:00   ` Robert A Duff
replies disabled

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