Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Syntax specification for hint directives

Tags:

syntax

delphi

Everyone knows about hint directives. However from reviewing various modules, i learned what, for example, deprecated accepts string -literal- to be emitted in the same manner $MESSAGE does:

procedure StinkStr(S: string); deprecated 'You are unemployed now.'; 

However, documentation being modestly silent about that (highest version i have my hands on is D2010) and i hate guesswork in exact sciences - the questions are:

  • where this syntax is documented?
  • and, since which version it has been available?

Correction: accepts string literals only, refuses constants (a la external).


Current findings: D210 chokes on string literals accompanying any hint directive other than deprecated, also eats the hint if unit is marked with it.

like image 987
Free Consulting Avatar asked Oct 11 '22 15:10

Free Consulting


1 Answers

It's documented here http://docwiki.embarcadero.com/RADStudio/en/Deprecated

As the comments mention above, it seems to have been introduced in Delphi 2009. Another reference is http://www.tindex.net/Language/deprecatedwithcomment.html

like image 96
Malcolm Groves Avatar answered Oct 15 '22 09:10

Malcolm Groves