是否可以像这样在运行时确定大小的数组,
Procedure prog is
type myArray is array(Integer range <>) of Float;
arraySize : Integer := 0;
theArray : myArray(0..arraySize);
Begin
-- Get Array size from user.
put_line("How big would you like the array?");
get(arraySize);
For I in 0..arraySize Loop
theArray(I) := 1.2 * I;
End Loop;
End prog;
除了使用动态链接列表或类似结构,是否有其他实现此结果的方法?或是否有一个比使用动态链接列表更简单的内置数据结构?