Compiler syntax error lazarus / 61-Beginners ---------------------------------------------------------------------- pigpigpig · 2015-07-15 08:26 Sorry! my English is poor. and I'm a Lazarus Beginner. I write a program like: (open a doc and goto bookmark ) Procedure Word_Goto_Bookmark( aWordDoc , aBookMark, Fill_String;String); Var oW : Variant; Begin     oW:=CreateOleObject('Word.Application');     oW.documents.Open( aWordDoc ,TRUE);     oW.Visible:=True;     If oW.ActiveDocument.Bookmarks.Exists( aBookMark ) Then    Begin       oW.Selection.goto(-1,,,aBookMark); //Lazarus Error But Delphi OK.       oW.Selection.TypeText(Fill_String);    End; End; in Delphi Compiler & Run OK. But in FPC / codeTyphone / Lazarus Compiler say  Syntax Error, "identifier" excepted but "GOTO" found How Can I slove the problem? Thank! ---------------------------------------------------------------------- marcov · 2015-07-15 08:29 This is normal. COM identifiers can match reserved identifiers. The standard solution is to add a "&"  (so Selection.&Goto ) to signal the parser the reserved meaning of the identifier is not meant. I don't know if that is a FPC 2.6.x or a 3.x version, and if it works in all modes (it should work in mode delphi, since it is a Delphi feature) ---------------------------------------------------------------------- pigpigpig · 2015-07-31 02:40 Quote from: marcov on July 15, 2015, 10:29:51 amThis is normal. COM identifiers can match reserved identifiers. The standard solution is to add a "&"  (so Selection.&Goto ) to signal the parser the reserved meaning of the identifier is not meant. I don't know if that is a FPC 2.6.x or a 3.x version, and if it works in all modes (it should work in mode delphi, since it is a Delphi feature) Program Compile OK,Thanks!