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

I actually use OLE automation under Free Pascal, but some objects have properties that use the words reserverd 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 mistake

StdOleAux.pas (783.15) Fatal: syntax error, "identifier" expected, but "TYPE" found

so the question is, how can I access these properties in FPC when they have a name that is a reserved word?

FPC 2.2.4

Lazarus 0.9.28.2

via {$MODE DELPHI}

+3
source share
1 answer

"2.5.1" FPC, . " Delphi" , 2010-03-22.

+2

Source: https://habr.com/ru/post/1781476/


All Articles