program PetabyteConstantExample;
{
In Free Pascal, the largest unsigned integer type is QWord (64‑bit).
A petabyte fits comfortably inside 64 bits:
1 PiB = 2^50 = 1,125,899,906,842,624 bytes
1 PB = 10^15 = 1,000,000,000,000,000 bytes
}
const
// Binary petabyte (pebibyte), using a bit shift.
// 1 shl 50 = 2^50 bytes.
PETABYTE_PIB: QWord = QWord(1) shl 50;
// Decimal petabyte (SI petabyte), using a plain numeric literal.
// No digit separators, for maximum compatibility.
PETABYTE_PB: QWord = 1000000000000000;
var
sizeBinary: QWord;
sizeDecimal: QWord;
begin
sizeBinary := PETABYTE_PIB;
sizeDecimal := PETABYTE_PB;
WriteLn('1 PiB = ', sizeBinary, ' bytes');
WriteLn('1 PB = ', sizeDecimal, ' bytes');
end.
(*
run:
1 PiB = 1125899906842624 bytes
1 PB = 1000000000000000 bytes
*)