When semicolons are used as statement terminators, there are certain statements that require a semicolon at then end, such as expression statements in C:
a = b+c;
function_call(a,b);
There are other statements that do not require a semicolon at the end, specifically compound statements:
if (a) {do_something();}
a = b+c;
a = b+c;
You never need a semicolon after a compound statement like that, even if there is another statement following it. In Pascal, statements are used as separators. An assignment doesn't need a semicolon after it if it comes at the end of a block. In Pascal, blocks are surrounded with begin and end rather than braces, so this is legal:
begin
a := b
end
But semicolons are needed between statements so you need a semicolon after an assignment if it has another statement following it, and you also need one after end if another statement follows it:
begin
a := b;
begin
a := c
end;
a := d
end
So although the semicolon-as-separator makes a lot of intuitive sense, it is odd in practice and programmers tend to forget them or put them in the wrong places more often than they do with languages where the semicolon is just used to end certain statement types.
begin
a := b
end
But semicolons are needed between statements so you need a semicolon after an assignment if it has another statement following it, and you also need one after end if another statement follows it:
begin
a := b;
begin
a := c
end;
a := d
end
So although the semicolon-as-separator makes a lot of intuitive sense, it is odd in practice and programmers tend to forget them or put them in the wrong places more often than they do with languages where the semicolon is just used to end certain statement types.