Hi. I'm an experienced programmer, but new to Lazarus/Pascal.
I open a new project, double click on the form and type this:
procedure TForm1.FormCreate(Sender: TObject);
begin
var x: integer;
end;
And then hit F9. I get an error message "Error: Illegal expression" and "Fatal: Syntax error, ";" expected but "identifier X" found"
If I remove the "var x: integer;" line it compiles fine
What's going on here? I've tried everything I can think of/Google!
I'm using Lazarus 2.0.0 and FPC 3.0.4