News for hackers. Stuff that matters.
Re:Free Pascal by jonsen on Sunday December 13, 2020 @10:19AM (#25407112)
> ... it didnt have the empty statement ';' ... > Sometimes you were not allowed to end you statements with ';' (since they were ended by the block, so this would require the emptystatement).

Pascal has empty statements. They are exactly that - empty. In C syntax ; is a statement end token, so the empty statement is ‘;’. In Pascal ; is a statement separator token, so the empty statement is ‘’, and ‘;’ is two empty statements. So the typical error is to write “....... ;” where only one statement is syntactically allowed.

Example:

  if x > y
  then x := y ;
  else ...  Syntax error. 
      Only one statement allowed between then and else.

  then { x := y ; }
  else ...    is Ok. 
      The blocking makes two statements into one.
Re:Free Pascal by andi999 on Sunday December 13, 2020 @10:26AM (#25407165)
thanks.