MyChat Scripts Engine: Low
"For developers", "Server scripts", "Functions descriptions", "Other", "Low".
Getting the lowest value of a specified variable.
Syntax
function Low(var x): integer;
Parameters and return values
Parameter |
Type |
Value |
x |
any type |
variable. |
Результат функции
Integer value, the lowest value of a variable.
Example
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.
Script work result
[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