Why are semicolons as statement separators used in Pascal?
Why are semicolons as statement separators used in Pascal?
- Pascal uses the semicolon as separators which have been taken from one of the features of the ALGOL language.
- Semicolon as a statement terminator is used so that other statements can be preceded or other statements can be executed.
- There is no semicolon that is required before the keyword end as it defines the record type declaration.
- A block and a case statement also don’t require any semicolon as they needs to be carried on and gets executed.
- The semicolon in the language is not used immediately before the keyword else if the “if” statement is used as, the else statement is treated a single statement.
- The semicolon gets applied to the sequence of statement that is written in more than one statement.