Using a indentifier or reserved word in a automation object under FPC
- by Salvador
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}