On Sun, 19 Feb 2006 10:37:36 -0800 (PST), Judy Perry <[EMAIL PROTECTED]> wrote:
Mark,

Right, again, my argument was less "IF-THENs rule and CASE-SWITCHes suck"
than IF-THENs are easier to read/learn/are more transparent for
non/novice-programmers.

Just to add a tiny footnote to this: Judy, how would you tackle a situation where a user (or a handler) can put in say a number from 1 to 50, and each of those numbers requires the program to carry out a different action? It wouldn't really be feasible to have a depth of 50 if-then-elses, so if you want to stick to a simple sequential model, either you'd have to use a switch (case) statement, or alternatively a structure like a handler 'myHandler' containing 50 statements like:

if my parameter = 33 then
 doMyThirtyThirdThing
 exit myHandler
end if

which - to me - looks pretty much the same in terms of transparency.

I guess this horse is pretty well dead by now.

Graham


------------------------------------------------------------------------ ---
Graham Samuel / The Living Fossil Co. / UK and France

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to