On Sunday 17 November 2013 20:47:29 Ivanko B wrote:
> Can you show real code?
> =================
> if a = 0 then
>   writeln ('a=0');
> else
>   if a = 1 then
>     writeln ('a=1');
>   end
>   else
>     if a = 2 then
>       writeln ('a=2');
>     end
>     else
>       writeln ('a=else');
>     end;
> end;
>
That is from a project of you? I mean't code from Podpiska project for 
example. I would write above code as:
"
 if a = 0 then
  writeln ('a=0');
 else
  if a = 1 then
   writeln ('a=1');
  else
   if a = 2 then
    writeln ('a=2');
   else
    writeln ('a=else');
   end;
  end;
 end;
"
I don't think
"
 if a = 0 then
  writeln ('a=0');
 elseif a = 1 then
   writeln ('a=1');
 elseif a = 2 then
  writeln ('a=2');
 else
  writeln ('a=else');
 end;
"
is much better. In my opinion it is worse because there is no indention 
between "if" and "end;" and it hides nesting levels.

Martin

<<attachment: elseif.png>>

------------------------------------------------------------------------------
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