function DECtoHEX(number:integer):string;...function Form1.DECtoHEX(number:integer):string; <- THIS IS LINE 49 ! ! !var a:integer; b,c:string;begin repeat a:=number mod 16; number:=number div 16; case a of 10 : b:='A'; 11 : b:='B';12 : b:='C';13 : b:='D';14 : b:='E';15 : b:='F'; else b:=inttostr(a); end; c:=concat(b,c) until number=0; result:=c;end;
function TForm1.DECtoHEX(number:integer):string;
function TForm1.DECtoHEX(number:integer):string;const HEXCHAR: string[16] = '0123456789ABCDEF';begin result := ''; repeat result := HEXCHAR[number mod 16 + 1] + result; number := number div 16; until number=0;end;
function TForm1.DECtoHEX(number:integer):string;begin result := format('%x',[number])end;
function TForm1.DECtoHEX(number:integer):string;vars:string;begin s := format('%x',[number]); if length(s) =1 then s:='0'+s; result:=s;end;
Code: [Select]function TForm1.DECtoHEX(number:integer):string; s := format('%x',[number]); if length(s) =1 then s:='0'+s;if you need format #000000, for exemple to html or BB code (font color)
function TForm1.DECtoHEX(number:integer):string; s := format('%x',[number]); if length(s) =1 then s:='0'+s;