Why are semicolons as statement separators used in Pascal

Untitled Forums Programming Assignment Help Why are semicolons as statement separators used in Pascal

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #15212
    ahprofessional
    Participant

    Why are semicolons as statement separators used in Pascal?

    #15215
    juwanine
    Participant

    Ans:- 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.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.