1: #include "../h/rt.h"
   2: 
   3: /*
   4:  * +x - convert x to numeric type.
   5:  *  Operational definition: generate runerr if x is not numeric.
   6:  */
   7: 
   8: number(nargs, arg1, arg0)
   9: int nargs;
  10: struct descrip arg1, arg0;
  11:    {
  12:    DclSave
  13:    union numeric n;
  14: 
  15:    SetBound;
  16:    switch (cvnum(&arg1, &n)) {
  17:       case T_LONGINT:
  18:          mkint(n.integer, &arg0);
  19:          break;
  20: 
  21:       case T_REAL:
  22:          mkreal(n.real, &arg0);
  23:          break;
  24: 
  25:       default:
  26:          runerr(102, &arg1);
  27:       }
  28:    ClearBound;
  29:    }
  30: 
  31: Opblock(number,1,"+")

Defined functions

number defined in line 8; used 1 times
  • in line 31
Last modified: 1984-11-18
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 687
Valid CSS Valid XHTML 1.0 Strict