[fpc-pascal] High() and Low() for empty dynamic arrays

Michael Van Canneyt michael at freepascal.org
Sat Feb 8 17:39:21 CET 2014



On Sat, 8 Feb 2014, leledumbo wrote:

>> Here:
>>
>> var MyArray : array of longint;
>>
>> begin
>>    writeln(low(MyArray));
>>    writeln(high(MyArray));
>> end.
>>
>> prints
>>
>> 0
>> -1
>
> Is this (High() on empty dynamic arrays return -1) documented somewhere?

It is now, in the system unit documentation for the High() function.

Michael.



More information about the fpc-pascal mailing list