Получить минимальное значение переменной-параметра.

 

Синтаксис

function Low(var x): integer;

 

Параметри та значення, що повертаються

Параметр

Тип

Значення

x

будь-який тип

змінна.

 

Результат функції

Ціле число, мінімальне значення, яке може прийняти змінна параметр.

 

Приклад


var
  i: integer;
  j: int64;
  a: array[0..3] of string;
begin
  mLogScript('Minimal value of integer : ' + inttostr(Low(i)), '');
  mLogScript('Minimal value of int64   : ' + inttostr(Low(j)), '');
  
    for i := 0 to 3 do a[i] := inttostr(random(100));
    
    for i := low(a) to high(a) do mLogScript('a[' + inttostr(i) + '] = ' + a[i], '');
end.


Результат роботи скрипту

[15:11:26] (Log "Low"): Minimal value of integer : -2147483648

[15:11:26] (Log "Low"): Minimal value of int64   : -9223372036854775808

[15:11:26] (Log "Low"): a[0] = 18

[15:11:26] (Log "Low"): a[1] = 3

[15:11:26] (Log "Low"): a[2] = 69

[15:11:26] (Log "Low"): a[3] = 32
 

Ещё посмотреть

High

IntToStr
mLogScript