filePro Quiz
Kenneth Brody
kenbrody at spamcop.net
Thu Aug 11 05:57:22 PDT 2011
On 8/10/2011 11:58 PM, Jay Ashworth wrote:
> ----- Original Message -----
>> From: "George Simon"<george at flowersoftusa.com>
[...]
>> 1 ------- - - - - - - - - - - - - - - - -
>> TOP ◄ If: @sk="save" ◄
>> Then: input popup yn "Do You Want to Exit? (Y/n) " default "Y" ◄
>
> If the user is ever prompted *to* hit N, we must assume this line was
> reached with @SK eq "SAVE", or they wouldn't have been prompted. This
> colors all our other answers, but it makes line 1 TRUE.
Also, lacking an @UPDATE event, or a "GOTO TOP" elsewhere in the code, the
only way to get to line 1 would be to press SAVE on a screen somewhere. (Or,
in this particular example, execute the PUSHKEY "[SAVE]" on line 5.)
>> 2 ------- - - - - - - - - - - - - - - - -
>> ◄ If: @sk="save" and yn ne "N" ◄
>> Then: end ◄
>
> Now, we're assuming that this is *one continuous flow of execution*,
> so SK again eq "SAVE", and yn eq "N" so this one's FALSE.
While you are correct that this is "false", your explanation is partially wrong.
>> 3 ------- - - - - - - - - - - - - - - - -
>> ◄ If: @sk="save" ◄
>> Then: screen ,(@fd) ◄
>
> We're still running, @SK still equals "SAVE", since line 2 is contra-factual,
[...]
You fail, for the same reason George asked me "is this a known bug" when his
code didn't work as he thought it should
--
Kenneth Brody
More information about the Filepro-list
mailing list