Error using TOpendialog lazarus / 13-General ---------------------------------------------------------------------- franky1112 · 2009-01-31 12:17 Hallo, I had used Borland Pascal in the past over many year. I installed lazarus yesterday evening. But using this code-example causes problems: Code: [Select]procedure TfrmGraficConvert.btDirClick(Sender: TObject); begin    var filename : string;    if OpenDialog1.Execute then    begin      filename := OpenDialog1.Filename;      ShowMessage(filename);    end; end;    It causes such Errormessages GraficConvert.pas(41,8) Error: Illegal expression GraficConvert.pas(41,8) Error: Illegal expression GraficConvert.pas(41,8) Fatal: Syntax error, ";" expected but It seems lazarus has a problem with:    var filename : string; But why is this an illegal expression? should I Add some special units for using string-Types pressing F1 causes next Errormessage. No help found for D\lazarus\ ...blabla Installing help files under D:\lazarus doesn's solve the problem. thank you for help ---------------------------------------------------------------------- Phil · 2009-01-31 12:43 Move var statement above the begin. Thanks. -Phil ---------------------------------------------------------------------- Leledumbo · 2009-02-02 05:01 QuoteI had used Borland Pascal in the past over many yearYou may have forgotten that declaration isn't statement in Pascal