Why are Pascal control structures inconsistent?

Posted by 70Mike on Stack Overflow See other posts from Stack Overflow or by 70Mike
Published on 2011-01-06T23:58:46Z Indexed on 2011/01/07 0:53 UTC
Read the original article Hit count: 380

Filed under:
|
|
|

Most Pascal control structures make sense to me, like:

for ... do {statement};

if (condition) then {statement};

while (condition) do {statement};

where the {statement} is either a single statement, or a begin ... end block. I have a problem with:

repeat {statement-list} until (expression);

try {statement-list} except {statement-list} end;

Wouldn't it be better that repeat and try have the same general structure, accepting only a single statement or a begin ... end block, instead of having a statement-list that's not formally blocked with a begin and an end?

© Stack Overflow or respective owner

Related posts about delphi

Related posts about pascal