我刚接触delphi,我在权限表里加了3个字段,我要实现更新和添加的功能,模仿他的功能
在上面声明赋值了
WMSZG:=0;
WMSPP:=0;
WMSPPJL:=0;
报错信息UnitQX.pas[535]: Undeclared identifier:'WMSZG'
        UnitQX.pas[536]: Undeclared identifier:'WMSPP'
        UnitQX.pas[537]: Undeclared identifier:'WMSPPJL' 
        UnitQX.pas[658]: Missing operator or semicolon
        JMC.dpr[70]:Could not compile used unit 'UnitQX.pas'Var
        S:String;
        I:integer;
begin
        s := Edit1.Text;
        for i := 1 to Length(s) do
            if i mod 2 = 0 then s[i] := UpCase(s[i]);
                        Edit1.Text := s;
        s := Edit2.Text;
        for i := 1 to Length(s) do
           if i mod 2 = 0 then s[i] := UpCase(s[i]);
                    Edit2.Text := s;
        QX1:=0;
        qxxztd:=0;
        qxljswcx:=0;
        qxdhycsr:=0;
        qxljfh:=0;
        qxfhswcx:=0;
        qxlj:=0;
        qxltr:=0;
        qxltc:=0;
        qxltd:=0;
        qxlkktpc:=0;
        qxzjr:=0;
        qxzjcks:=0;
        qxzjckz:=0;
        qxljpd:=0;
        qxzjkpd:=0;
        qxljcp:=0;
        QX5:=0;
        QX6:=0;
        RA:=0;
        RB:=0;
        RD:=0;
        QX8:=0;
        DPSJX:=0;
        DPSPD:=0;
        DPSSJ:=0;
        DPSbq:=0;
        DPSdzbq:=0;
        wmsXGLJDJ:=0;
        wmscj:=0;
        DPScj:=0;
        KWZT:=0;
        BZBJ:=0;
        XGDJ:=0;
        sx:=0;
        yhddj:=0;
        ehddj:=0;
        hfckwh:=0;
        ztck:=0;
        jxck:=0;
        tgyxj:=0;
        dzqtkgz:=0;
        yhddjgz:=0;
        ehddjgz:=0;
        wmsduj:=0;
        WMSZG:=0;
        WMSPP:=0;
        WMSPPJL:=0;
        for i := 0 to (ListBox2.Items.Count - 1) do
        begin
                if ListBox2.Items.Strings[i] = '物料数据维护' then
                        QX1 := 1;
                if ListBox2.Items.Strings[i] = '新增仓库业务提单' then
                        QXxztd := 1;
                if ListBox2.Items.Strings[i] = '零件收货事务查询(换盘`调整`强制过账)' then
                        QXljswcx:= 1;
                if ListBox2.Items.Strings[i] = '到货异常输入' then
                        QXdhycsr:= 1;
                if ListBox2.Items.Strings[i] = '零件发货管理(打印地面区`打印出库无货`恢复出库无货`打印出库清单)' then
                        QXljfh:= 1;
                if ListBox2.Items.Strings[i] = '发货事务查询(强制过账)' then
                        QXfhswcx:= 1;
                if ListBox2.Items.Strings[i] = '零件外废转库`零件停用设置`零件让步使用' then
                        QXlj:= 1;
                if ListBox2.Items.Strings[i] = '立库入库库位转移' then
                        QXltr:= 1;                if ListBox2.Items.Strings[i] = '立库出库库位转移' then
                        QXltc:= 1;                if ListBox2.Items.Strings[i] = '立库地面库位转移' then
                        QXltd:= 1;
                if ListBox2.Items.Strings[i] = '直供收货查询' then
                        WMSZG:= 1;
                if ListBox2.Items.Strings[i] = '拼盘数据查询' then
                        WMSPP:= 1;
                if ListBox2.Items.Strings[i] = '拼盘数据记录查询' then
                        WMSPPJL:= 1;
                if ListBox2.Items.Strings[i] = '立库空托盘出库' then
                        QXlkktpc:= 1;
                if ListBox2.Items.Strings[i] = '整机入库事务' then
                        QXzjr:= 1;
                if ListBox2.Items.Strings[i] = '整机出库事务' then
                        QXzjcks:= 1;
                if ListBox2.Items.Strings[i] = '整机出库转移' then
                        QXzjckz:= 1;
                if ListBox2.Items.Strings[i] = '零件盘点' then
                        QXljpd:= 1;
                if ListBox2.Items.Strings[i] = '整机库盘点' then
                        QXzjkpd:= 1;
                if ListBox2.Items.Strings[i] = '零件抽盘' then
                        QXljcp:= 1;
                if ListBox2.Items.Strings[i] = '基础数据维护' then
                        QX5:= 1;
                if ListBox2.Items.Strings[i] = '权限设置管理' then
                        QX6 := 1;
                if ListBox2.Items.Strings[i] = '条码打印管理' then
                        QX8 := 1;
                if ListBox2.Items.Strings[i] = 'RF零件入库权限' Then
                        RA:=1;
                if ListBox2.Items.Strings[i] = 'RF-DPS补料权限' Then
                        RB:=1;
                if ListBox2.Items.Strings[i] = 'RF整机入出库权限' Then
                        RD:=1;
                if ListBox2.Items.Strings[i] = 'DPS检选处理' Then
                        DPSJX:=1;
                if ListBox2.Items.Strings[i] = 'DPS盘点管理' Then
                        DPSPD:=1;
                if ListBox2.Items.Strings[i] = 'DPS上架作业' Then
                        DPSSJ:=1;
                if ListBox2.Items.Strings[i] = 'DPS电子标签地址设定' Then
                        DPSDZbq:=1;
                if ListBox2.Items.Strings[i] = 'DPS标签单个测试' Then
                        DPSbq:=1;                if listbox2.Items.Strings[i]='WMS超级帐户' then
                        wmscj:=1;
                if listbox2.Items.Strings[i]='DPS超级帐户' then
                        DPScj:=1;
                 if ListBox2.Items.Strings[i] = '修改零件收货单据' Then
                        WMSXGLJDJ:=1;
                 if ListBox2.Items.Strings[i] = '库位明细(库位状态)' then
                        kwzt:=1;
                 if listbox2.Items.Strings[i]='备注编辑(物料明细)' then
                        bzbj:=1;
                 if listbox2.Items.strings[i]='上线(收货事务查询)' then
                        sx:=1;
                 if listbox2.Items.Strings[i]= '1号堆垛机/2号堆垛机(发货管理)' then
                        yhddj:=1;
                 if listbox2.Items.Strings [i]='恢复出库无货' then
                        hfckwh:=1;
                 if listbox2.Items.Strings [i]='暂停出库' then
                        ztck:=1;
                 if listbox2.Items.Strings[i]= '继续出库' then
                        jxck:=1;
                 if listbox2.Items.Strings [i]='提高优先级' then
                        tgyxj:=1;
                if listbox2.Items.Strings [i]= '定制区退库过帐' then
                        dzqtkgz:=1;
                if listbox2.Items.Strings [i]='1号堆垛机过账/2号堆垛机过账' then
                        yhddjgz:=1;                if listbox2.Items.Strings [i]='定制区手动退库过帐' then
                        wmsduj:=1;
        end;