home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
seedump.zip
/
SAMPLES
/
CA.BAG
next >
Wrap
Text File
|
1995-07-27
|
716b
|
37 lines
/*
* Author : a priori computer solutions GmbH
* Title : Rexx-Utility
* Notice : Written 1995, the 27th of July
*/
/*
* mini calculator for bagger
*/
parse upper arg p
if p == '?' | p == '' then do
say " help for minicalculator ca"
say " any arithmetic expression, the rexx style "
say " X'...' for hexadecimal terms "
return 0
end
numeric digits 12
return doit(p)
doit: procedure
parse upper arg p
s = pos("X'", p)
if s <> 0 then do
s = s + 2
e = pos("'", p, s)
d = x2d(substr(p,s, e-s))
s = s - 2
return doit( overlay(d,p,s,e-s+1) )
end
res='r'
interpret res '=' p
say r' X'd2x(r)
return r