L
liangtianyi
Unregistered / Unconfirmed
GUEST, unregistred user!
编译没问题,运行在(1)处出现问题
去掉(1)和(2),编译也没问题,运行出错,强制读取:(
是个基本问题,请高手帮帮我吧,在此谢过了[]
//分两个文件
program Project2;
{$APPTYPE CONSOLE}
uses
SysUtils,
Unit1 in 'Unit1.pas';
var aa: Taa;
begin
aa.Create
<--(1)
aa.inca;
aa.free
<--(2)
end.
//以下为Unit1.pas
unit Unit1;
interface
type
Taa = class
private
a : integer;
public
procedure inca;
end;
implementation
procedure Taa.inca;
begin
inc(a);
end;
end.
去掉(1)和(2),编译也没问题,运行出错,强制读取:(
是个基本问题,请高手帮帮我吧,在此谢过了[]
//分两个文件
program Project2;
{$APPTYPE CONSOLE}
uses
SysUtils,
Unit1 in 'Unit1.pas';
var aa: Taa;
begin
aa.Create
<--(1)
aa.inca;
aa.free
<--(2)
end.
//以下为Unit1.pas
unit Unit1;
interface
type
Taa = class
private
a : integer;
public
procedure inca;
end;
implementation
procedure Taa.inca;
begin
inc(a);
end;
end.