L
liersbaby
Unregistered / Unconfirmed
GUEST, unregistred user!
代码如下,编译的时候报field or method identifier expected,为啥呀?怎么解决
unit TestUtil;
interface
type
ItemGroup = class(TObject)
private
ID : Integer;
GroupName : String;
public
property ItemGroupID : Integer read getID write setID;
property ItemGroupGroupName : String read getGroupName write setGroupName;
procedure setID(ItemGroupID : Integer);
function getID:Integer;
procedure setGroupName(ItemGroupGroupName : String);
function getGroupName:String;
{ Public declarations }
end;
implementation
function ItemGroup.getGroupName: String;
begin
Result := GroupName;
end;
function ItemGroup.getID: Integer;
begin
Result := ID;
end;
procedure ItemGroup.setGroupName(ItemGroupGroupName: String);
begin
if GroupName <> ItemGroupGroupName then
GroupName := ItemGroupGroupName;
end;
procedure ItemGroup.setID(ItemGroupID: Integer);
begin
if ID <> ItemGroupID then
ID := ItemGroupID;
end;
end.
unit TestUtil;
interface
type
ItemGroup = class(TObject)
private
ID : Integer;
GroupName : String;
public
property ItemGroupID : Integer read getID write setID;
property ItemGroupGroupName : String read getGroupName write setGroupName;
procedure setID(ItemGroupID : Integer);
function getID:Integer;
procedure setGroupName(ItemGroupGroupName : String);
function getGroupName:String;
{ Public declarations }
end;
implementation
function ItemGroup.getGroupName: String;
begin
Result := GroupName;
end;
function ItemGroup.getID: Integer;
begin
Result := ID;
end;
procedure ItemGroup.setGroupName(ItemGroupGroupName: String);
begin
if GroupName <> ItemGroupGroupName then
GroupName := ItemGroupGroupName;
end;
procedure ItemGroup.setID(ItemGroupID: Integer);
begin
if ID <> ItemGroupID then
ID := ItemGroupID;
end;
end.