home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / RXCALC.ZIP / MEMCLEAR.CAL < prev    next >
Text File  |  1991-05-15  |  664b  |  13 lines

  1. /* Rexx Calculator Memory Clear Key                                  */
  2. parse arg memory                       /* get the count of memories  */
  3. numeric digits CalcPrecision()         /* set current precision      */
  4. numeric form value CalcForm()          /* set current form           */
  5.  
  6. if \datatype(memory, 'Whole')          /* must be whole number       */
  7.   then return 'Error'                  /* return error indicator     */
  8.  
  9. if memory < 1 | memory >50             /* valid for counter          */
  10.   then return 'Error'                  /* return error indicator     */
  11.  
  12. 'SET' trunc(memory) '0'                /* store new value            */
  13.