home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
VSCPPv8.zip
/
VACPP
/
IBMCPP
/
samples
/
TOOLKIT
/
CREXX
/
REXXCALC
/
MEMMINUS.CAL
< prev
next >
Wrap
Text File
|
1994-11-17
|
811b
|
16 lines
/* Rexx Calculator Memory Subtraction Key */
parse arg memory, value /* get the count of memories */
numeric digits CalcPrecision() /* set current precision */
numeric form value CalcForm() /* set current form */
if \datatype(memory, 'Whole') /* must be whole number */
then return 'Error' /* return error indicator */
if memory < 1 | memory >50 /* valid for counter */
then return 'Error' /* return error indicator */
memory = trunc(memory) /* get as an integer */
'GET' memory 'REGISTER' /* get current value */
'SET' memory register - value /* store new value */