Difference between revisions of "Low"
From SCAR Divi Manual
(Created page with "==Definition== <source lang="scar" lines="false"> function Low(x): Int64; </source> ==Availability== SCAR Divi 3.00 > Current ==Description== Returns the lower bound of an arra...") |
(No difference)
|
Latest revision as of 09:58, 29 June 2011
Definition
function Low(x): Int64;
Availability
SCAR Divi 3.00 > Current
Description
Returns the lower bound of an array or data type specified in x. The function only works with arrays and Category:Basic Types, the entry format is fairly trivial, it can be a value, constant or variable.
Example
var a: array[1..5] of string; b: TStringArray; c: Integer; d: Byte; begin SetLength(b, 5); WriteLn('The lower-bound of static array with range 1..5 is ' + IntToStr(Low(a))); WriteLn('The lower-bound of a dynamic array with length 5 is ' + IntToStr(Low(b))); WriteLn('The lower-bound of an integer is ' + IntToStr(Low(c))); WriteLn('The lower-bound of a byte is ' + IntToStr(Low(d))); end.
Output:
The lower-bound of static array with range 1..5 is 1 The lower-bound of a dynamic array with length 5 is 0 The lower-bound of an integer is -2147483648 The lower-bound of a byte is 0