choose case as_win_name case "w_emp" // do something case "w_dept" // do something case else f_throw(PopulateError(0, "Invalid as_win_name " + IfNull("'" + as_win_name + "'", "NULL") + ". It must be 'w_emp' or 'w_dept'")) end choose
choose case as_win_name case "w_emp" // do something case "w_dept" // do something case else f_throw(PopulateError(0, "Invalid as_win_name " + IfNull("'" + as_win_name + "'", "NULL") + ". It must be 'w_emp' or 'w_dept'")) end choose
Logically, the "// do something" line has the same nesting level as if it would appear in an if construction (rather than choose case), so why to use MORE tabs to express the SAME level?
This style is looking unusual, but try it, and you will really enjoy more understandable scripts, especially when choose cases are nested (or mixed with ifs and loops).