From: Michele Andreoli (m.andreoli@tin.it)
Date: Mon Jun 25 2001 - 15:37:16 CEST
On Sun, Jun 24, 2001 at 03:56:35PM -0400, Alfie Costa nicely wrote:
> Better to prevent bad input. Given a (y/n) prompt, if the user types 'j',
>the
> computer should just beep, or if there was no sound, the screen could make a
> face. The script would accept only yYnN or <Enter>. Some util like MsDos'
> 'CHOICE' or BASIC's 'INKEY$' would be needed though.
>
> Difficult pseudocode like this:
>
> :start
> SomeStringInputRoutine "Is it Yes or is it No?" $A
> if ucase(left(1,$A)) = "Y" goto end
> if ucase(left(1,$A)) = "N" goto end
> goto start
> :end
>
This requires a lot of changes in any script, because translation do
not apply to the code itself.
Michele
-- I keep trying to locate a meeting of Quantum Physicists. But everytime they set a meeting time, the location changes. And vice versa -- Anonymous --------------------------------------------------------------------- To unsubscribe, e-mail: mulinux-unsubscribe@sunsite.dk For additional commands, e-mail: mulinux-help@sunsite.dk
This archive was generated by hypermail 2.1.6 : Sat Feb 08 2003 - 15:27:19 CET