// Hexadecimal (s) --> decimal (I) [rewrite: jey]
Function hextoint (S: string): integer;
Begin // $ indicates hexadecimal
Result: = strtoint ('$' + S );
End;
// convert the value in decimal format to a binary string [rewrite: jey]
function inttobin (I: integer): string;
begin
while I <> 0 DO
begin // I mod 2 modulo and format it again
result: = format ('% d' + result, [I mod 2]);
I: = I Div 2
end;
// binary (s) --> decimal (d) [rewrite: jey]
uses math;
function hextoint (S: string): Double;
begin
while length (s) <> 0 DO
begin // 2 ^ (length-1) power
If s [1] = '1' then result: = Result + power (2, length (S)-1);
S: = copy (S, 2, length (s);
end;
// decimal (I) --> hexadecimal (s)
// D built-in function, digits length, generally set to 4.
function inttohex (value: integer; digits: integer): string;
// Data (s) --> binary (s)
// Any data is stored in binary format! (Transfer)
Function conertde (S: string): string;
VaR
I: integer;
Begin
For I: = 1 to length (s) do
Result: = Result + inttohex (ord (s [I]), 2 );
End;