This is Delphi Prism for .NET. I am running into this error(s), "A type cannot be be used as a standalone statement", and I don't understand or know why. The compiler is pointing at the lines right below var keywords.
method ScriptDlgpas.ExecuteStartup;
var
sname:string; <------ error raised here
slist:ArrayList; <------ error raised here
begin
sname := basedir+'system\startup.scr';
if File.Exists(sname) then
begin
slist := new ArrayList;
ExecuteScript(slist);
end;
end;
The Google Search isn't helping either.
Thanks in advance.
There's probably something above it that doesn't get closed properly.