开发者

Using a indentifier or reserved word in a automation object under FPC

Actually i am using OLE automation under Free Pascal , but some objects have properties which uses reserverd words as names, so i cannot compile the code.

check this sample

  MyObj : OleVariant;
begin
  MyObj := CrealeOleObject('AObject');
  MyObj.Descriptor   := Param1;
  MyObj.Type            := Param2;  //this line  generates a error

this is the error

Std开发者_StackOverflow社区OleAux.pas(783,15) Fatal: Syntax error, "identifier" expected but "TYPE" found

so the question is how i can access this properties in FPC when they have a name which is a reserved word?

FPC 2.2.4

Lazarus 0.9.28.2

using {$MODE DELPHI}


You need version '2.5.1' of FPC, see the report "Allow Extended Identifiers in the Delphi mode" which has been resolved as fixed at 2010-03-22.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜