Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2010-03

syntax of deprecated / with/without semicolon ?

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Martin

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

it gives this example:

Show quoted text 7 lines
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.

Reply by email