delphi关于"(" expected but "[" found
unitUnit4;interfaceusesWindows,Messages,SysUtils,Variants,Classes,Graphics,Controls,F...
unit Unit4;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Menus, ExtCtrls;
type
TFrmManage = class(TForm)
MainMenu1: TMainMenu;
N1: TMenuItem;
N2: TMenuItem;
N3: TMenuItem;
N4: TMenuItem;
N5: TMenuItem;
N6: TMenuItem;
N7: TMenuItem;
Label1: TLabel;
monday: TLabel;
tuesday: TLabel;
wednesday: TLabel;
thursday: TLabel;
friday: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
Label9: TLabel;
Button1: TButton;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Btok: TButton;
Btcancel: TButton;
one: TCheckBox;
two: TCheckBox;
three: TCheckBox;
four: TCheckBox;
five: TCheckBox;
six: TCheckBox;
seven: TCheckBox;
eight: TCheckBox;
nine: TCheckBox;
ten: TCheckBox;
eleven: TCheckBox;
tewlve: TCheckBox;
thirteen: TCheckBox;
fourteen: TCheckBox;
fifteen: TCheckBox;
sixteen: TCheckBox;
seventeen: TCheckBox;
eighteen: TCheckBox;
nineteen: TCheckBox;
tweenty: TCheckBox;
N8: TMenuItem;
RadioGroup1: TRadioGroup;
procedure N8Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FrmManage: TFrmManage;
implementation
uses Unit1, Unit2, Unit3, Unit5, Unit6, Unit7;
const MaxN=100; //定义的全局变量
type
link=array[0..9] of Integer; //标记每个组员排班被用到的次数
mk=array[0..20] of Integer;//标记每个班次是否被排到
m=array[0..MaxN] of Integer;// 记录每个班能够被排到的人数
n=array[0..MaxN] of Integer;// 记录每个人能够提供的班次
mat=array[0..19,0..9] of integer;// 记录班次与人员的对应关系
{$R *.dfm}
procedure TFrmManage.N8Click(Sender: TObject);
begin
Button1.Enabled:=true;
end;
procedure TFrmManage.Button1Click(Sender: TObject);
var i,k:integer;
begin
for i:=0 to 9 do
n[i]:=0;
//k:=strtoint(RadioGroup1.Items[RadioGroup1.ItemIndex]);
end;
end.
就是最后n[i]那里总是会报"(" expected but "[" found,不知道为什么!!! 展开
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Menus, ExtCtrls;
type
TFrmManage = class(TForm)
MainMenu1: TMainMenu;
N1: TMenuItem;
N2: TMenuItem;
N3: TMenuItem;
N4: TMenuItem;
N5: TMenuItem;
N6: TMenuItem;
N7: TMenuItem;
Label1: TLabel;
monday: TLabel;
tuesday: TLabel;
wednesday: TLabel;
thursday: TLabel;
friday: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
Label9: TLabel;
Button1: TButton;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Btok: TButton;
Btcancel: TButton;
one: TCheckBox;
two: TCheckBox;
three: TCheckBox;
four: TCheckBox;
five: TCheckBox;
six: TCheckBox;
seven: TCheckBox;
eight: TCheckBox;
nine: TCheckBox;
ten: TCheckBox;
eleven: TCheckBox;
tewlve: TCheckBox;
thirteen: TCheckBox;
fourteen: TCheckBox;
fifteen: TCheckBox;
sixteen: TCheckBox;
seventeen: TCheckBox;
eighteen: TCheckBox;
nineteen: TCheckBox;
tweenty: TCheckBox;
N8: TMenuItem;
RadioGroup1: TRadioGroup;
procedure N8Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FrmManage: TFrmManage;
implementation
uses Unit1, Unit2, Unit3, Unit5, Unit6, Unit7;
const MaxN=100; //定义的全局变量
type
link=array[0..9] of Integer; //标记每个组员排班被用到的次数
mk=array[0..20] of Integer;//标记每个班次是否被排到
m=array[0..MaxN] of Integer;// 记录每个班能够被排到的人数
n=array[0..MaxN] of Integer;// 记录每个人能够提供的班次
mat=array[0..19,0..9] of integer;// 记录班次与人员的对应关系
{$R *.dfm}
procedure TFrmManage.N8Click(Sender: TObject);
begin
Button1.Enabled:=true;
end;
procedure TFrmManage.Button1Click(Sender: TObject);
var i,k:integer;
begin
for i:=0 to 9 do
n[i]:=0;
//k:=strtoint(RadioGroup1.Items[RadioGroup1.ItemIndex]);
end;
end.
就是最后n[i]那里总是会报"(" expected but "[" found,不知道为什么!!! 展开
展开全部
type
link=array[0..9] of Integer; //标记每个组员排班被用到的次数
mk=array[0..20] of Integer;//标记每个班次是否被排到
m=array[0..MaxN] of Integer;// 记录每个班能够被排到的人数
n=array[0..MaxN] of Integer;// 记录每个人能够提供的班次
mat=array[0..19,0..9] of integer;// 记录班次与人员的对应关系
这部分,= 全改成:,另,把这段中的type 去掉
link=array[0..9] of Integer; //标记每个组员排班被用到的次数
mk=array[0..20] of Integer;//标记每个班次是否被排到
m=array[0..MaxN] of Integer;// 记录每个班能够被排到的人数
n=array[0..MaxN] of Integer;// 记录每个人能够提供的班次
mat=array[0..19,0..9] of integer;// 记录班次与人员的对应关系
这部分,= 全改成:,另,把这段中的type 去掉
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询