procedure TForm1.W3Button18Click(Sender: TObject);
var
NormalInteger : Integer;
BigInteger : Integer;
begin
NormalInteger := 2147483647;
BigInteger := 9223372036854775807;
WriteLn('NormalInteger : '+NormalInteger.ToString);
WriteLn('BigInteger : '+BigInteger.ToString);
WriteLn('Calculated number : '+(27 * 4).ToString);
NormalInteger := 1234;
// Display 123 decimal in hex with minimal width
WriteLn('1234 decimal = '+NormalInteger.ToHexString(0));
// Display 123 decimal in hex with fixed width
WriteLn('1234 decimal = '+NormalInteger.ToHexString(8));
//conversion to binary string
WriteLn('1234 decimal = '+NormalInteger.ToBin(12));
WriteLn('1234 decimal = '+NormalInteger.ToBin(16));
end;
|