【发布时间】:2016-04-21 06:27:43
【问题描述】:
我正在尝试将一些字符串传递给动态字符串数组,在这种情况下它正在工作:
procedure DoSomeThing(in_cmd: string; var out_strs: array of string);
begin
..
for n := low(out_strs) to high(out_strs) do
begin
out_strs[n] :='bla bla';
end;
end;
在应用中使用 as:
.
.
.
SetLength(my_out_str, sizer);
DoSomeThing('do it now', my_out_str);
.
.
但我想从程序中my_out_str SetLength。 有可能吗?
【问题讨论】:
-
阅读:stackoverflow.com/questions/22140387 这是一个众所周知的问题,它的根源是在非常非常非常古老的时代,当时 Pascal(甚至还没有 Delphi)根本没有动态数组......
标签: delphi