Before someone dings me for it, the SELECT below should have this as the first WHEN clause:
WHEN symbol('_.'answer)<>'VAR' THEN say 'Invalid answer' Brian Nielsen On Mon, 7 Jul 2008 16:51:27 -0500, Brian Nielsen <[EMAIL PROTECTED]> wrote: >On Mon, 7 Jul 2008 20:26:50 +0000, Chip Davis <[EMAIL PROTECTED]> wrote: > >>In fairness, your problem is not caused by unfamiliarity with formal >>logic, but mere lack of clarity. > >Brings back memories of the obfuscated C contest. Some of those entries >were brilliant. > >>If I might suggest an alternative so far overlooked: > >And here is another (obscure) alternative that also allows phrases and >synonyms without complicated logic tests: > >/* */ > >_.='' >_.y='Y' >_.ye='Y' >_.yes='Y' >_.okay='Y' >_.please='Y' >_.maybe='Help' >phrase='I GROVEL BEFORE YOU TO PERMIT IT' >_.phrase='Y' >phrase='YOU ARE CRAZY IF YOU THINK I WANT TO DO THAT' >_.phrase='N' > >say 'Should I do this?' >pull answer > >SELECT > WHEN _.answer='Y' > THEN say 'I will do it' > WHEN _.answer='N' > THEN say 'I will not do it' > WHEN _.answer='Help' > THEN say 'RTFM and make up your mind' > OTHERWISE say 'Invalid answer' >END > > >Brian Nielsen >======================== ========================= =======================