在线等待您的帮助!

lifeng1214 2003-01-12 11:27:00
有一段代码
public
function IsWin(IsBlack:boolean):boolean;
{ Public declarations }
function tform.IsWin(IsBlack:boolean):boolean;
label exit1;
var
......
运行时出现(1)undeclared identifier:'tform'
(2)'END'expected but 'LABEL'found
(3)Statements not allowed in interface part
的错误
请帮我改正!
...全文
30 20 打赏 收藏 转发到动态 举报
写回复
用AI写文章
20 条回复
切换为时间正序
请发表友善的回复…
发表回复
li_zhifu 2003-01-16
  • 打赏
  • 举报
回复
1)if (Tag[i,j]=wtag) and (Tag[i,j+1]=wtag) and (Tag[i,j+2]=wtag) and (Tag[i,j+3]=wtag) and (Tag[i,j+4]=wtag) then

2)句的上一行少了一个;
lifeng1214 2003-01-16
  • 打赏
  • 举报
回复
(1)if (Tag[i,j]=wtag) and (Tag(i,j+1)=wtag) and (Tag(i,j+2)=wtag) and (Tag(i,j+3)=wtag) and (Tag(i,j+4)=wtag) then
错误信息:Missing operator or semicolon
(2)tag[col,row]:=1;
错误信息:Missing operator or semicolon
li_zhifu 2003-01-16
  • 打赏
  • 举报
回复
unit wuzq;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Grids, ExtCtrls;

type
TForm1 = class(TForm)
Panel1: TPanel;
DrawGrid1: TDrawGrid;
procedure DrawGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
procedure DrawGrid1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure FormCreate(Sender: TObject);
private
Tag:array[0..18,0..18]of integer;
{0 代表没有,1 黑子,2 代表白子}
IsBlack:boolean;
{ Private declarations }
public
function IsWin(IsBlack:boolean):boolean;
{ Public declarations }
end;
var
Form1: TForm1;

implementation

{$R *.dfm}

function TForm1.IsWin(IsBlack:boolean):boolean;
label exit1;
var
i,j:integer;
wtag:integer;
begin
IsWin:=false;
if IsBlack then
wtag:=1
else
wtag:=2;
for i:=0 to 18 do
for j:=0 to 14 do
begin
{是否有行连接}
if (i<15) and (Tag[i,j]=wtag) and (Tag[i+1,j]=wtag) and (Tag[i+2,j]=wtag) and (Tag[i+3,j]=wtag) and (Tag[i+4,j]=wtag) then
begin
IsWin:=True;
goto exit1;
end;
{是否有列连接}
if (Tag[i,j]=wtag) and (Tag[i,j+1]=wtag) and (Tag[i,j+2]=wtag) and (Tag[i,j+3]=wtag) and (Tag[i,j+4]=wtag) then
begin
IsWin:=True;
goto exit1;
end;
{是否主对角连接}
if (i<15) and (Tag[i,j]=wtag) and (Tag[i+1,j+1]=wtag) and (Tag[i+2,j+2]=wtag) and (Tag[i+3,j+3]=wtag) and (Tag[i+4,j+4]=wtag) then
begin
IsWin:=True;
goto exit1;
end;
{是否副对角连接}
if (Tag[i,j]=wtag)
and (Tag[i-1,j+1]=wtag)
and (Tag[i-2,j+2]=wtag)
and (Tag[i-3,j+3]=wtag)
and (Tag[i-4,j+4]=wtag)
then
begin
IsWin:=True;
goto exit1;
end;
end;
exit1:;
end;

procedure TForm1.DrawGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
begin
DrawGrid1.Canvas.Pen.Color:=clBlack;
DrawGrid1.Canvas.Brush.Color:=clBlack;
if tag[acol,arow]=1 then
DrawGrid1.Canvas.Ellipse(acol*21,arow*21,(acol+1)*21,(arow+1)*21)
else if tag[acol,arow]=2 then
DrawGrid1.Canvas.Arc(acol*21,arow*21,(acol+1)*21,(arow+1)*21,acol*21,arow*21,acol*21,arow*21)
else
begin
DrawGrid1.Canvas.Pen.Color:=clWhite;
DrawGrid1.Canvas.Brush.Color:=clWhite;
DrawGrid1.Canvas.Ellipse(acol*21,arow*21,(acol+1)*21,(arow+1)*21)
end;
end;

procedure TForm1.DrawGrid1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
var
col,row:integer;
i,j:integer;
begin
DrawGrid1.Canvas.Pen.Color:=clBlack;
DrawGrid1.Canvas.Brush.Color:=clBlack;
DrawGrid1.MouseToCell(x,y,col,row);
if tag[col,row]=0 then
begin
if IsBlack then
begin
DrawGrid1.Canvas.Ellipse(col*21,row*21,(col+1)*21,(row+1)*21);
tag[col,row]:=1;
end else
begin
DrawGrid1.Canvas.Arc(col*21,row*21,(col+1)*21,(row+1)*21,col*21,row*21,col*21,row*21);
tag[col,row]:=2;
end;
if IsWin(IsBlack) then
begin
if IsBlack then
if MessageDlg('黑棋胜利',mtInformation,[mbOK],0)=mrOK then
begin
for i:=0 to 18 do
for j:=0 to 18 do
begin
tag[i,j]:=0
end;
DrawGrid1.Invalidate;
end;
end;
IsBlack:=not IsBlack;
end;
end;

procedure TForm1.FormCreate(Sender: TObject);
var
i,j:integer;
begin
for i:=0 to 18 do
for j:=0 to 18 do
begin
Tag[i,j]:=0
end;
IsBlack:=true;
DrawGrid1.Canvas.Pen.Color:=clBlack;
DrawGrid1.Canvas.Brush.Color:=clBlack;
end;
end.

//全拷贝过去吧,帮你调试好的,肯定行的
lifeng1214 2003-01-16
  • 打赏
  • 举报
回复
在这一行if (Tag[i,j]=wtag) and (Tag[i,j+1]=wtag) and (Tag[i,j+2]=wtag) and (Tag[i,j+3]=wtag) and (Tag[i,j+4]=wtag) then
发生Missing operator or semicolon错误信息和 incompatible types错误
tag[col,row]:=1;
错误信息:Missing operator or semicolon
llf026 2003-01-15
  • 打赏
  • 举报
回复
在代码的实现部分
1、function IsWin(IsBlack:boolean):boolean;
应增加"TForm1."为
function TForm1.IsWin(IsBlack:boolean):boolean;
2、IsWin函数的实现代码的最后一句:exit1;
少了一个":"; 应改为:"exit1: ;";

li_zhifu 2003-01-15
  • 打赏
  • 举报
回复
按我给的代码,错误信息是什么?错在哪?
lifeng1214 2003-01-14
  • 打赏
  • 举报
回复
还是不行
redwh 2003-01-14
  • 打赏
  • 举报
回复
unit wuzq;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Grids, ExtCtrls;

type
TForm1 = class(TForm)
Panel1: TPanel;
DrawGrid1: TDrawGrid;
procedure DrawGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
procedure DrawGrid1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure FormCreate(Sender: TObject);
procedure DrawGrid1Click(Sender: TObject);
private
Tag:array[0..18,0..18]of integer;
{0 代表没有,1 黑子,2 代表白子}
IsBlack:boolean;
{ Private declarations }
public
{ Public declarations }

var
Form1: TForm1;

implementation

{$R *.dfm}
function IsWin(IsBlack:boolean):boolean;
var
i,j:integer;
wtag:integer;
label exit1;
begin
IsWin:=false;
if IsBlack then
wtag:=1 else
wtag:=2;
for i:=0 to 18 do
for j:=0 to 14 do
begin
{是否有行连接}
if (i<15)
and (Tag[i,j]=wtag)
and (Tag[i+1,j]=wtag)
and (Tag[i+2,j]=wtag)
and (Tag[i+3,j]=wtag)
and (Tag[i+4,j]=wtag)
then
begin
IsWin:=True;
goto exit1;
end;
{是否有列连接}
if (Tag[i,j]=wtag)
and (Tag(i,j+1)=wtag)
and (Tag(i,j+2)=wtag)
and (Tag(i,j+3)=wtag)
and (Tag(i,j+4)=wtag)
then
begin
IsWin:=True;
goto exit1;
end;
{是否主对角连接}
if (i<15)
and (Tag[i,j]=wtag)
and (Tag[i+1,j+1]=wtag)
and (Tag[i+2,j+2]=wtag)
and (Tag[i+3,j+3]=wtag)
and (Tag[i+4,j+4]=wtag)
then
begin
IsWin:=True;
goto exit1;
end;
{是否副对角连接}
if (Tag[i,j]=wtag)
and (Tag[i-1,j+1]=wtag)
and (Tag[i-2,j+2]=wtag)
and (Tag[i-3,j+3]=wtag)
and (Tag[i-4,j+4]=wtag)
then
begin
IsWin:=True;
goto exit1;
end;
end;
exit1;
end;

procedure TForm1.DrawGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
begin
DrawGrid1.Canvas.Pen.Color:=clBlack;
DrawGrid1.Canvas.Brush.Color:=clBlack;
if tag[aco,arow]=1 then
DrawGrid1.Canvaas.Ellipse(acol*21,arow*21,(acol+1)*21,(arow+1)*21)
else if tag[acol,arow]=2 then
DrawGrid1.Canvaas.Arc(acol*21,arow*21,(acol+1)*21,(arow+1)*21,acol*21,arow*21,acol*21,arow*21,)
else
begin
DrawGrid1.Canvas.Pen.Color:=clWhite;
DrawGrid1.Canvas.Brush.Color:=clWhite;
DrawGrid1.Canvaas.Ellipse(acol*21,arow*21,(acol+1)*21,(arow+1)*21)
end;
end;

procedure TForm1.DrawGrid1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
var
col,row:integer;
i,j:integer;
begin
DrawGrid1.Canvas.Pen.Color:=clBlack;
DrawGrid1.Canvas.Brush.Color:=clBlack;
DrawGrid1.MouseToCell(x,y,col,row);
if tag[col,row]=0 then
begin
if IsBlack then
begin
DrawGrid1.Canvaas.Ellipse(acol*21,arow*21,(acol+1)*21,(arow+1)*21)
tag[col,row]=1;
end else
begin
DrawGrid1.Canvaas.Arc(acol*21,arow*21,(acol+1)*21,(arow+1)*21,acol*21,arow*21,acol*21,arow*21,)
tag[col,row]:=2;
end;
if IsWin(IsBlack) then
begin
if IsBlack then
if MessageDlg('黑棋胜利',mtInformation,[mbOK],0)=mrOK then
begin
for i:=0 to 18 do
for j:=0 to 18 do
begin
tag[i,j]:=0
end;
DrawGrid1.Invalidate;
end;
end;
IsBlack:=not IsBlack;
end;
end;

procedure TForm1.FormCreate(Sender: TObject);
var
i,j:integer;
begin
for i:=0 to 18 do
for j:=0 to 18 do
begin
Tag[i,j]=0
end;
IsBlack:=true;
DrawGrid1.Canvas.Pen.Color:=clBlack;
DrawGrid1.Canvas.Brush.Color:=clBlack;
end;
procedure TForm1.DrawGrid1Click(Sender: TObject);
begin

end;

end;



//还有问题再说!
li_zhifu 2003-01-14
  • 打赏
  • 举报
回复
unit wuzq;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Grids, ExtCtrls;

type
TForm1 = class(TForm)
Panel1: TPanel;
DrawGrid1: TDrawGrid;
procedure DrawGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
procedure DrawGrid1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure FormCreate(Sender: TObject);
procedure DrawGrid1Click(Sender: TObject);
private
Tag:array[0..18,0..18]of integer;
{0 代表没有,1 黑子,2 代表白子}
IsBlack:boolean;
{ Private declarations }
public
function IsWin(IsBlack:boolean):boolean;
{ Public declarations }
end;
var
Form1: TForm1;

implementation

{$R *.dfm}

function TForm1.IsWin(IsBlack:boolean):boolean;
label exit1;
var
i,j:integer;
wtag:integer;
begin
IsWin:=false;
if IsBlack then
wtag:=1
else
wtag:=2;
for i:=0 to 18 do
for j:=0 to 14 do
begin
{是否有行连接}
if (i<15) and (Tag[i,j]=wtag) and (Tag[i+1,j]=wtag) and (Tag[i+2,j]=wtag) and (Tag[i+3,j]=wtag) and (Tag[i+4,j]=wtag) then
begin
IsWin:=True;
goto exit1;
end;
{是否有列连接}
if (Tag[i,j]=wtag) and (Tag(i,j+1)=wtag) and (Tag(i,j+2)=wtag) and (Tag(i,j+3)=wtag) and (Tag(i,j+4)=wtag) then
begin
IsWin:=True;
goto exit1;
end;
{是否主对角连接}
if (i<15) and (Tag[i,j]=wtag) and (Tag[i+1,j+1]=wtag) and (Tag[i+2,j+2]=wtag) and (Tag[i+3,j+3]=wtag) and (Tag[i+4,j+4]=wtag) then
begin
IsWin:=True;
goto exit1;
end;
{是否副对角连接}
if (Tag[i,j]=wtag)
and (Tag[i-1,j+1]=wtag)
and (Tag[i-2,j+2]=wtag)
and (Tag[i-3,j+3]=wtag)
and (Tag[i-4,j+4]=wtag)
then
begin
IsWin:=True;
goto exit1;
end;
end;
exit1;
end;

procedure TForm1.DrawGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
begin
DrawGrid1.Canvas.Pen.Color:=clBlack;
DrawGrid1.Canvas.Brush.Color:=clBlack;
if tag[aco,arow]=1 then
DrawGrid1.Canvaas.Ellipse(acol*21,arow*21,(acol+1)*21,(arow+1)*21)
else if tag[acol,arow]=2 then
DrawGrid1.Canvaas.Arc(acol*21,arow*21,(acol+1)*21,(arow+1)*21,acol*21,arow*21,acol*21,arow*21,)
else
begin
DrawGrid1.Canvas.Pen.Color:=clWhite;
DrawGrid1.Canvas.Brush.Color:=clWhite;
DrawGrid1.Canvaas.Ellipse(acol*21,arow*21,(acol+1)*21,(arow+1)*21)
end;
end;

procedure TForm1.DrawGrid1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
var
col,row:integer;
i,j:integer;
begin
DrawGrid1.Canvas.Pen.Color:=clBlack;
DrawGrid1.Canvas.Brush.Color:=clBlack;
DrawGrid1.MouseToCell(x,y,col,row);
if tag[col,row]=0 then
begin
if IsBlack then
begin
DrawGrid1.Canvaas.Ellipse(acol*21,arow*21,(acol+1)*21,(arow+1)*21)
tag[col,row]=1;
end else
begin
DrawGrid1.Canvaas.Arc(acol*21,arow*21,(acol+1)*21,(arow+1)*21,acol*21,arow*21,acol*21,arow*21,)
tag[col,row]:=2;
end;
if IsWin(IsBlack) then
begin
if IsBlack then
if MessageDlg(‘黑棋胜利’,mtInformation,[mbOK],0)=mrOK then
begin
for i:=0 to 18 do
for j:=0 to 18 do
begin
tag[i,j]:=0
end;
DrawGrid1.Invalidate;
end;
end;
IsBlack:=not IsBlack;
end;
end;

procedure TForm1.FormCreate(Sender: TObject);
var
i,j:integer;
begin
for i:=0 to 18 do
for j:=0 to 18 do
begin
Tag[i,j]=0
end;
IsBlack:=true;
DrawGrid1.Canvas.Pen.Color:=clBlack;
DrawGrid1.Canvas.Brush.Color:=clBlack;
end;
procedure TForm1.DrawGrid1Click(Sender: TObject);
begin

end;

end.
cdkey 2003-01-12
  • 打赏
  • 举报
回复
function tform.IsWin(IsBlack:boolean):boolean;
label exit1;
var
......
这一段不应该放这里,要放到后面去。在{im...}后,我忘记了,呵呵
Crob 2003-01-12
  • 打赏
  • 举报
回复
在你代码中哪个位置有一个begin或者end没有配对,仔细检查一下吧

这个只有靠一点点找了
蝈蝈太阳 2003-01-12
  • 打赏
  • 举报
回复
这种提示,如何看懂?
atuchina 2003-01-12
  • 打赏
  • 举报
回复
对的,好象你写的代码位置放的不对
li_zhifu 2003-01-12
  • 打赏
  • 举报
回复
你最好把整个单元都贴出来。这样根本看不清楚!
redwh 2003-01-12
  • 打赏
  • 举报
回复
(1) :Tform没有定义。
(2):label exit1应该在var后

你最好把整个单元都贴出来。这样根本看不清楚!

superMouse 2003-01-12
  • 打赏
  • 举报
回复
一群文盲
huangrenguang 2003-01-12
  • 打赏
  • 举报
回复
你使用第归吧。
lifeng1214 2003-01-12
  • 打赏
  • 举报
回复
unit wuzq;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Grids, ExtCtrls;

type
TForm1 = class(TForm)
Panel1: TPanel;
DrawGrid1: TDrawGrid;
procedure DrawGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
procedure DrawGrid1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure FormCreate(Sender: TObject);
procedure DrawGrid1Click(Sender: TObject);
private
Tag:array[0..18,0..18]of integer;
{0 代表没有,1 黑子,2 代表白子}
IsBlack:boolean;
{ Private declarations }
public
function IsWin(IsBlack:boolean):boolean;
{ Public declarations }
function IsWin(IsBlack:boolean):boolean;
label exit1;
var
i,j:integer;
wtag:integer;
begin
IsWin:=false;
if IsBlack then
wtag:=1 else
wtag:=2;
for i:=0 to 18 do
for j:=0 to 14 do
begin
{是否有行连接}
if (i<15)
and (Tag[i,j]=wtag)
and (Tag[i+1,j]=wtag)
and (Tag[i+2,j]=wtag)
and (Tag[i+3,j]=wtag)
and (Tag[i+4,j]=wtag)
then
begin
IsWin:=True;
goto exit1;
end;
{是否有列连接}
if (Tag[i,j]=wtag)
and (Tag(i,j+1)=wtag)
and (Tag(i,j+2)=wtag)
and (Tag(i,j+3)=wtag)
and (Tag(i,j+4)=wtag)
then
begin
IsWin:=True;
goto exit1;
end;
{是否主对角连接}
if (i<15)
and (Tag[i,j]=wtag)
and (Tag[i+1,j+1]=wtag)
and (Tag[i+2,j+2]=wtag)
and (Tag[i+3,j+3]=wtag)
and (Tag[i+4,j+4]=wtag)
then
begin
IsWin:=True;
goto exit1;
end;
{是否副对角连接}
if (Tag[i,j]=wtag)
and (Tag[i-1,j+1]=wtag)
and (Tag[i-2,j+2]=wtag)
and (Tag[i-3,j+3]=wtag)
and (Tag[i-4,j+4]=wtag)
then
begin
IsWin:=True;
goto exit1;
end;
end;
exit1;
end;
var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.DrawGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
begin
DrawGrid1.Canvas.Pen.Color:=clBlack;
DrawGrid1.Canvas.Brush.Color:=clBlack;
if tag[aco,arow]=1 then
DrawGrid1.Canvaas.Ellipse(acol*21,arow*21,(acol+1)*21,(arow+1)*21)
else if tag[acol,arow]=2 then
DrawGrid1.Canvaas.Arc(acol*21,arow*21,(acol+1)*21,(arow+1)*21,acol*21,arow*21,acol*21,arow*21,)
else
begin
DrawGrid1.Canvas.Pen.Color:=clWhite;
DrawGrid1.Canvas.Brush.Color:=clWhite;
DrawGrid1.Canvaas.Ellipse(acol*21,arow*21,(acol+1)*21,(arow+1)*21)
end;
end;

procedure TForm1.DrawGrid1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
var
col,row:integer;
i,j:integer;
begin
DrawGrid1.Canvas.Pen.Color:=clBlack;
DrawGrid1.Canvas.Brush.Color:=clBlack;
DrawGrid1.MouseToCell(x,y,col,row);
if tag[col,row]=0 then
begin
if IsBlack then
begin
DrawGrid1.Canvaas.Ellipse(acol*21,arow*21,(acol+1)*21,(arow+1)*21)
tag[col,row]=1;
end else
begin
DrawGrid1.Canvaas.Arc(acol*21,arow*21,(acol+1)*21,(arow+1)*21,acol*21,arow*21,acol*21,arow*21,)
tag[col,row]:=2;
end;
if IsWin(IsBlack) then
begin
if IsBlack then
if MessageDlg(‘黑棋胜利’,mtInformation,[mbOK],0)=mrOK then
begin
for i:=0 to 18 do
for j:=0 to 18 do
begin
tag[i,j]:=0
end;
DrawGrid1.Invalidate;
end;
end;
IsBlack:=not IsBlack;
end;
end;

procedure TForm1.FormCreate(Sender: TObject);
var
i,j:integer;
begin
for i:=0 to 18 do
for j:=0 to 18 do
begin
Tag[i,j]=0
end;
IsBlack:=true;
DrawGrid1.Canvas.Pen.Color:=clBlack;
DrawGrid1.Canvas.Brush.Color:=clBlack;
end;
procedure TForm1.DrawGrid1Click(Sender: TObject);
begin

end;

end;
运行时出现(1)undeclared identifier:'tform'
(2)'END'expected but 'LABEL'found
(3)Statements not allowed in interface part
的错误
请帮我改正!
li_zhifu 2003-01-12
  • 打赏
  • 举报
回复
我知道错误在哪了,可是却不太好说,哪位高手找到了这个问题的描述方式了吗?请楼主贴出整个Unit的全部代码,我才好替你改。如果上述就是你的全部代码的话,那可是少了很多东西
lifeng1214 2003-01-12
  • 打赏
  • 举报
回复
public
function IsWin(IsBlack:boolean):boolean;
{ Public declarations }
function tform.IsWin(IsBlack:boolean):boolean;
var
label exit1;
i,j:integer;
wtag:integer;
begin
IsWin:=false;
if IsBlack then
wtag:=1 else
wtag:=2;
for i:=0 to 18 do
for j:=0 to 14 do
begin
{是否有行连接}
if (i<15)
and (Tag[i,j]=wtag)
and (Tag[i+1,j]=wtag)
and (Tag[i+2,j]=wtag)
and (Tag[i+3,j]=wtag)
and (Tag[i+4,j]=wtag)
then
begin
IsWin:=True;
goto exit1;
end;
{是否有列连接}
if (Tag[i,j]=wtag)
and (Tag(i,j+1)=wtag)
and (Tag(i,j+2)=wtag)
and (Tag(i,j+3)=wtag)
and (Tag(i,j+4)=wtag)
then
begin
IsWin:=True;
goto exit1;
end;
{是否主对角连接}
if (i<15)
and (Tag[i,j]=wtag)
and (Tag[i+1,j+1]=wtag)
and (Tag[i+2,j+2]=wtag)
and (Tag[i+3,j+3]=wtag)
and (Tag[i+4,j+4]=wtag)
then
begin
IsWin:=True;
goto exit1;
end;
{是否副对角连接}
if (Tag[i,j]=wtag)
and (Tag[i-1,j+1]=wtag)
and (Tag[i-2,j+2]=wtag)
and (Tag[i-3,j+3]=wtag)
and (Tag[i-4,j+4]=wtag)
then
begin
IsWin:=True;
goto exit1;
end;
end;
exit1;
end;
运行时出现(1)undeclared identifier:'tform'
(2)'END'expected but 'LABEL'found
(3)Statements not allowed in interface part
的错误
请帮我改正!

5,392

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧