谁知道怎么得到一个动态数组的长度

sailer_shi 2003-11-20 09:30:16
如题
...全文
168 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
phoenix_l 2003-11-20
  • 打赏
  • 举报
回复
length(数组名) 返回数组的长度
angle097113 2003-11-20
  • 打赏
  • 举报
回复
var
s:array of string;
a: integer;
begin
a := length(s);
end;
hmzgz81 2003-11-20
  • 打赏
  • 举报
回复
Returns the number of characters in a string or elements in an array.

Unit

System

Category

string handling routines

function Length(S): Integer;

Description

Length returns the number of characters actually used in the string or the number of elements in the array.

For single-byte and multibyte strings, Length returns the number of bytes used by the string. For Unicode (WideString) strings, Length returns the number of bytes divided by two.

S is a string- or array-valued expression.
hmzgz81 2003-11-20
  • 打赏
  • 举报
回复
arrayLength/type
cxreal 2003-11-20
  • 打赏
  • 举报
回复
length(arrayname)
zzh26 2003-11-20
  • 打赏
  • 举报
回复
setlength(数组名) 定义长度
length(数组名) 数组长度
zzh26 2003-11-20
  • 打赏
  • 举报
回复
high(数组名) 最大下标
low(数组名) 最小下标

5,388

社区成员

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

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