|
|
1.1 ! root 1: #include "../h/rt.h" ! 2: ! 3: /* ! 4: * numeric(x) - convert x to numeric type. ! 5: */ ! 6: Xnumeric(nargs, arg1, arg0) ! 7: int nargs; ! 8: struct descrip arg1, arg0; ! 9: { ! 10: union numeric n1; ! 11: ! 12: switch (cvnum(&arg1, &n1)) { ! 13: #ifdef LONGS ! 14: case T_LONGINT: ! 15: #else LONGS ! 16: case T_INTEGER: ! 17: #endif LONGS ! 18: mkint(n1.integer, &arg0); ! 19: break; ! 20: ! 21: case T_REAL: ! 22: mkreal(n1.real, &arg0); ! 23: break; ! 24: ! 25: default: ! 26: fail(); ! 27: } ! 28: } ! 29: ! 30: Procblock(numeric,1)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.