MaxLongInt
Moduł: System
const MaxLongInt = High(LongInt);
Stała zwraca największą możliwą wartość liczby typu LongInt, czyli 2147483647. Przykład wykorzystania:
program Foo;
{$APPTYPE CONSOLE}
uses
Math, SysUtils;
begin
Writeln('Integer: ', MaxInt, ' -- ');
Writeln('LongInt: ', MaxLongInt, ' -- ');
Writeln('Comp: ', MaxComp, ' -- ', MinComp);
Writeln('Double: ', MaxDouble, ' -- ', MinDouble);
Writeln('Single: ', MaxSingle, ' -- ', MinSingle);
Writeln('Extended: ', MaxExtended, ' -- ', MinExtended);
Writeln('TDateTime: ', MaxDateTime, ' -- ', MinDateTime);
Readln;
end.
Niestety w module System nie zadeklarowano stałej MinLongInt, minimalną możliwą wartość typu LongInt możemy pobrać korzystając z funkcji Low: `Low(LongInt)`.
Zobacz też: