On Monday 18 November 2013 08:36:44 Ivanko B wrote:
> Here "a=else" & "a = 2" depend on the decision for "a=1" which in turn
> depends on the one for "a=0". So we have 3 hirerarchy levels. To see
> the effect better me add some more padding:
> ------------------------------
> 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;
> --------------------------
> but really they're LOGICALLY on same hierarcy as "a=0".
>
Then use case:
"
 case a of
  0:
   writeln ('a=0');
  1:
   writeln ('a=1');
  2:
   writeln ('a=2');
  else
   writeln ('a=else');
 end;
"
> PS:  Martin, this code is atrociuos ! And with the new (BEGINless)
> syntax it can't be simplified even for single command per-branch.
>
I suggest to use a single space for indention only then you get a "end 
diagonal" at end, please see the screenshot in previous mail. What about my 
objection:
"
In my opinion it is worse because there is no indention 
between "if" and "end;" and it hides nesting levels.
"?

Martin

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