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

Posted by Salvador on Stack Overflow See other posts from Stack Overflow or by Salvador
Published on 2010-12-21T15:50:49Z Indexed on 2010/12/21 15:54 UTC
Read the original article Hit count: 310

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

StdOleAux.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}

© Stack Overflow or respective owner

Related posts about delphi

Related posts about lazarus