Beware: now I will pop in:
The _. stem was initalized to '' (nullstring)
consequently there is no need to check with SYMBOL()
Futhermore when coding SYMBOL('_.'answer) you will get a double
translation, if it were required/better, one should code
When symbol('_.answer')<>'VAR' then ....
With your SYMBOL() code, an answer like I GROVEL BEFORE YOU TO PERMIT
IT will be refused
2008/7/8 Brian Nielsen <[EMAIL PROTECTED]>:
> 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
>>========================
> =========================
> =======================
>
--
Kris Buelens,
IBM Belgium, VM customer support