gpt4 book ai didi

delphi - Delphi中如何获取动态数组的长度?

转载 作者:行者123 更新时间:2023-12-03 15:39:21 25 4
gpt4 key购买 nike

Delphi中有确定动态数组长度的函数吗?

最佳答案

使用Length函数来获取数组的长度:

var
ArrayLength: Integer;
begin
ArrayLength := Length(ArrayOfSomething);
...
end;

来自此函数的引用(由我强调):

In Delphi code, Length returns the number of characters actually used in the string or the number of elements in the array.

关于delphi - Delphi中如何获取动态数组的长度?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14500077/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com