Math

[ Delphi ] – Get the last day of the current month

function LastDayOfCurrentMonth: TDate;
var
  y, m, d: Word;
begin
  DecodeDate(now, y, m, d);
  m := m + 1;
  if m  12 then
 More >

 

Very PoorPoorRegularGoodVery Good ( Rate this post ! )
Loading ... Loading ...

[ Delphi ] – Convert a hexadecimal number into a binary number

function HexToBin(Hexadecimal: string): string;
const
  BCD: array [0..15] of string =
    ('0000', '0001', '0010', '0011', '0100', '0101', '0110', '0111',
 More >

 

Very PoorPoorRegularGoodVery Good ( Rate this post ! )
Loading ... Loading ...

[ Delphi ] – Convert a Binary Number into a Decimal Number

function BinToInt(Value: string): Integer;
var
  i, iValueSize: Integer;
begin
  Result := 0;
  iValueSize := Length(Value);
  for i := iValueSize downto 1 do

    if Value[i] = '1' then Result := Result + (1 shl (iValueSize - i));
end;
 More >

 

Very PoorPoorRegularGoodVery Good ( Rate this post ! )
Loading ... Loading ...