On 11/17/2013 06:46 PM, Martin Schreiber wrote:
> Do you have a real example where "elseif" is much better than nested "if"s

I use such indentation:

if a=b then begin
..x := y;
.end else if c = d then begin
..z := w;
.end else if f = g then begin
..s := t;
end;

with that "an "elseif keyword is not necessary at all and it corresponds 
nicely to "case:

case a of
.1:
..x := y;
.2:
..z := w;
.3:
..s := t;
end;

In C I do this with braces instead of begin/end and adding the braces in 
the "case" (here "switch") block for each alternative, as C has "fall 
through" switch cases.

-Michael

------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to