home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
seedump.zip
/
SAMPLES
/
CALC.BAG
< prev
next >
Wrap
Text File
|
1995-08-18
|
560b
|
34 lines
/*
* Author : a priori computer solutions GmbH
* Title : Rexx-Utility
* Notice : Written 1995, the 27th of July
*/
/*
* mini calculator for bagger
*/
parse arg p
if ( p = "" )
then do
say "Please use a valid decimal or hexadecimal number as parameter."
say "e.g. calc 15 "
return 0
end
numeric digits 12
res='r'
interpret res '=' p
if DATATYPE(r) == 'NUM' then do
say p '=' r' X'd2x(r)
return r
end
if DATATYPE(r,'X') == 1 then do
r = x2d(r)
say p '=' r' X'd2x(r)
return r
end
say r
return 0