起步软件技术论坛-X3

 找回密码
 立即注册
搜索
查看: 166|回复: 2

【结】定义二维数组出错**

[复制链接]
发表于 2008-3-5 11:31:51 | 显示全部楼层 |阅读模式
type  
SJ=array of string;
procedure TCLJSJ.btExcelClick(Sender: TObject);
var
  lSJ:array of SJ;
  lI,lJ,lCount:Integer;
begin
  lCount:=Query1.RecordCount;
  setLength(lSJ, lCount);

  for Li:=0 to lCount do
    setlength(SJ[li], 9);  //该行出错,提示见下面
end

[错误]Biz:\YTSBGLXT\CLGL\CLDD\CLDD.FUNC.DIR\CLJSJ.Form.PAS(61, 18): Incompatible types: "String[]" and "Int32"
回复

使用道具 举报

发表于 2008-3-5 11:38:34 | 显示全部楼层
setlength(lSJ[li], 9);       楼主少写了一个l
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-3-5 14:14:05 | 显示全部楼层
明白了。谢谢!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Justep Inc.

GMT+8, 2025-7-7 22:25 , Processed in 0.039344 second(s), 15 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表