Switch versus if/then/else ( was: Main menu puzzle, Klaus)

Mark Wieder mwieder at ahsoftware.net
Sun Feb 19 21:47:34 EST 2006


Judy-

Sunday, February 19, 2006, 5:34:10 PM, you wrote:

> If-Thens are readily comprehensible by non/novice-programmers.

> Case-Switch statements are preferred by "real" programmers.

Not so. I've put forth the situations in which I would normally use
switch statements, but I do use if/then statements (and even elses) a
whole lot. I even nest them.

It's kind of like getting past the hurdle of writing your first
function. And why you would want to do that in the first place.

But, yes, I'm in agreement that first you teach the if/thens - they're
the basis of programming. And why HTML isn't a programming language.
Once someone's mastered basic conditionals then you can start working
other things in (elses and elseifs and switches and such).

-- 
-Mark Wieder
 mwieder at ahsoftware.net




More information about the use-livecode mailing list