[fpc-pascal] syntax of deprecated / with/without semicolon ?

Martin fpc at mfriebe.de
Fri Mar 12 03:19:42 CET 2010


All I got is http://www.freepascal.org/docs-html/ref/refse5.html

it gives this example:
> Const
>   AConst = 12 deprecated;
>
> var
>   p : integer platform;
>
> Function Something : Integer; experimental;

So deprecated after a variable, or constant, does NOT have a semicolon. 
Indeed
   Const   AConst = 12  ;  deprecated;
does not compile.

After a function it does need a semicolon,
  function x: boolean deprecated;
does NOT compile (no semicolon

apparently properties need a semicolon too.
types do not want a semicolon
   type x = class .. end deprecated;


Is there a rule, when or why a semicolon is needed or not?


Also, it seems that functions with other modifiers (like virtual) must 
have deprecated as the last keyword....
   procedure a; deprecated; virtual;
doesn't work.









More information about the fpc-pascal mailing list