Main menu puzzle, Klaus

Judy Perry jperryl at ecs.fullerton.edu
Sun Feb 19 13:18:41 EST 2006


Show it to a non-programmer/novice programmer and ask him/her the same
question.  I suspect the answer will be very different.

Again, my argument is not that if-thens are superior from a
programming/logic standpoint but rather that they are more comprehensible
to normal humans who are not programmers.

And, hence, when used, they make Rev more approachable to that particular
audience (which, after all, is less likely to be biased against Rev
because it doesn't have its provenance in Redmond, isn't what "everybody"
uses, etc.).

Judy

On Sun, 19 Feb 2006, Stephen Barncard wrote:

> and this isn't cleaner? LOOK - a whole bunch of if's and thens don't
> have to be repeated over and over.
>
> on menupick varMenuItemSelected
>   SWITCH varMenuItemSelected
>   CASE "Cut"
>     SubCut
>   break
>   CASE "Copy"
>     SubCopy
>   break
>   CASE "Paste"
>     SubPaste
>   break
>   CASE "Undo"
>     SubUndo
>   break
>   CASE "Word Wrap"
>     SubWordWrap
>   break
>   DEFAULT
>     --
>   END SWITCH
> end menupick




More information about the use-livecode mailing list