Why are Pascal control structures inconsistent?
- by 70Mike
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?