[Hint] BillSaelUnitInput.pas(966): Value assigned to 'boardHeight' never used
出现这个错误有什么原因,如何解决
小弟试过换变量名,
将语句调换位置
将
doorheightDe:=dm.ADOQueryCommon.Fieldbyname('高度总减量').AsInteger;
改为
doorheightDe:=dm.ADOQueryCommon.Fields[4].AsInteger;
而
DoorCOLA:=这样的语句也不能执行
为避免全角字符之误,重打一遍,也有问题
为什么?请大侠救我
出现这个错误有什么原因,如何解决
小弟试过换变量名,
将语句调换位置
将
doorheightDe:=dm.ADOQueryCommon.Fieldbyname('高度总减量').AsInteger;
改为
doorheightDe:=dm.ADOQueryCommon.Fields[4].AsInteger;
而
DoorCOLA:=这样的语句也不能执行
为避免全角字符之误,重打一遍,也有问题
为什么?请大侠救我
解决方案 »
- 求一条排名的sql!
- 求助~~好烦人的问题的,大家来看看
- DWord 是一个什么类型,是一个什么意思?
- 打印控制
- 功能简单的数据库软件编写竟然如此烦琐。晕了。高手救命啊!
- clientdataset如何取得指定字段的值?
- 盗版的Delphi XE会不会自动发数据给易博龙公司
- 我有一表,其中有字符型及布尔型,我想在GRID或其它组件中显示布尔型,不知怎么办?
- 急,急,急!下载了一个DELPHI6.0 没有注册码.那位哥哥哥姐姐DDMM 帮小女子一个忙.在线等待
- 帮助!!!给高分!
- [[[[如何取出AdoConnection中的所有数据库?]]]]
- 有谁知道Target,在DELPHI中如何使用?
如果你的程序出错的话,应该是其他地方的问题。
你用的变量没有使用的需要而已http://lysoft.7u7.net
BoardNumer: integer; DoorStyle: string; var boardwidth: integer;
boardHeight: integer);
var
BdRow:integer;
Bdcol:integer;
DoorRowA:integer;
DoorColA:integer;
DoorWidthWord:string;
DoorHeightWord:string;
DoorRowWord:string;
DoorColWord:string;
DoorWidthDelta:integer;
DoorHeightDe:integer;
i:integer;
startchar:integer;
LSWord:string;begin
dm.ADOQueryCommon.Active :=false;
dm.adoquerycommon.SQL.clear;
dm.ADOQueryCommon.SQL.Add('select [开门方式对应尺寸表].* from 开门方式对应尺寸表 where 柜体高度='+inttostr(UnitHeight)+' and 门开方式='''+DoorStyle+'''');
dm.ADOQueryCommon.Active :=true;
DoorWidthWord:=dm.adoquerycommon.fieldbyname('宽度相对量').AsString ;
DoorHeightWord:=dm.adoquerycommon.fieldbyname('高度绝对量').AsString ;
DoorcolWord:=dm.adoquerycommon.fieldbyname('宽度对应数量').AsString ;
DoorrowWord:=dm.adoquerycommon.fieldbyname('高度对应数量').AsString ;
DoorWidthDelta:=dm.adoquerycommon.fieldbyname('宽度总减量').AsInteger;
doorheightDe:=dm.ADOQueryCommon.Fieldbyname('高度总减量').AsInteger; if BoardNumer=1 then
begin
boardHeight:=UnitHeight-DoorHeightDe;
boardwidth:=unitwidth-DoorWidthDelta;
end
以上的boardHeight:=UnitHeight-DoorHeightDe;无法执行,被跳过,为什么?如果不执行,就错了
procedure TFrmItemInput.GetBoardSize(UnitHeight, UnitWidth, BoardNo,
BoardNumer: integer; DoorStyle: string; var boardwidth: integer;
boardHeight: integer);--->这里改为var boardHeight: integer)
-----------------------
boardheight是值传递,你在过程内修改,但不在过程内使用,过程外肯定也不会用。肯定出hint
试着在boardHeight前面加上var 试一试
今天也在朋友的提醒下找到方法了
我原以为只要写在VAR后面的就可以
但要写成 var boardwidth,boardheight:integer
而不是原来的形式
向各位朋友表示感谢,给分,并请以后多帮小弟