Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
// Convert hex value to decimal
StringVar HexValue:= "FF";
NumberVar DecValue:=0; // Hold the result
NumberVar Factor:=1; // Counter for the hex string, used to determine the factor to use
NumberVar j:=0; // Loop counter
NumberVar tmpVal; // Temporary variable
for j := len(HexValue) to 1 step -1
do
(
// Working from right to left, determine the dec value of each hex character
if asc(uppercase(HexValue[j])) in 65 to 70 then
tmpVal := asc(uppercase(HexValue[j])) - 55
else
tmpVal := val (HexValue[j]);
// Add the decimal value to the total
DecValue := DecValue + (Factor * tmpVal);
// Keep track of which hex character we are working on
if Factor = 1 then
Factor := 16
else
Factor := factor + 16;
);
// Show the result
DecValue
[/ignore]tags, you never need worry about italic scripts.
Naith
// Convert hex value to decimal
StringVar HexValue:= "1000";
NumberVar DecValue:=0; // Hold the result
NumberVar Factor:=1; // Counter for the hex string, used to determine the factor to use
NumberVar j:=0; // Loop counter
NumberVar tmpVal; // Temporary variable
for j := len(HexValue) to 1 step -1
do
(
// Working from right to left, determine the dec value of each hex character
if asc(uppercase(HexValue[j])) in 65 to 70 then
tmpVal := asc(uppercase(HexValue[j])) - 55
else
tmpVal := val (HexValue[j]);
// Add the decimal value to the total
DecValue := DecValue + (Factor * tmpVal);
// Keep track of which hex character we are working on
Factor := Factor * 16
);
// Show the result
DecValue