Question

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}

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top