(view source code of dec2hex.rex as plain text)
/* Dec2Hex.rex, Version 1.01 *//* Parse command line parameters */parse arg number dummy .
/* Check command line parameters */if number = "" then call Syntax
if dummy <> "" then call Syntax
if Pos( "?", number ) > 0 then call Syntax
if DataType( number, "W" ) = 0 then call Syntax
/* Convert the number and display the result */saysay number||" = 0x"||Right( D2X( number ), 8, "0" )
Exit 0
Syntax:
saysay "Dec2Hex.rex, Version 1.01"
say "Convert specified decimal number to 8 digit hexadecimal"
saysay "Usage: <REXX> DEC2HEX.REX number"
saysay 'Where: "<REXX>" is your Rexx interpreter:'
say " - Windows: REGINA.EXE or REXX.EXE, whichever you installed"
say " - OS/2: no need to specify, just rename script to *.cmd"
say ' "number" is any decimal number ranging from 0..2147483647 (0x7FFFFFFF)'
saysay "Written by Rob van der Woude"
say "http://www.robvanderwoude.com"
Exit 1
Returnpage last modified: 2025-10-11; loaded in 0.0082 seconds