开发者

Syntax specification for hint directives

开发者 https://www.devze.com 2023-02-12 05:35 出处:网络
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:

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, refuse开发者_开发百科s 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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消