(view source code of dec2hex.pl as plain text)
#! perl
if ( ( index( $ARGV[0], "?" ) > -1 ) || ( $ARGV[0] == null ) || ( $ARGV[1] != null ) ) {
print "\nDec2Hex.pl, Version 1.00\n",
"Convert specified decimal number to 8 digit hexadecimal\n\n",
"Usage: DEC2HEX.PL number\n\n",
"Where: \"number\" is any decimal number ranging from ",
"0..2147483647 (0x7FFFFFFF)\n\n",
"Written by Rob van der Woude\n",
"http://www.robvanderwoude.com\n";
}
else {
$number = $ARGV[0];
$result = sprintf( "%08X", $number );
print "\n$ARGV[0] = 0x$result\n";
}
page last modified: 2024-04-16; loaded in 0.0048 seconds