1: #include "../h/rt.h"
2:
3: /*
4: * real(x) - convert x to real.
5: */
6:
7: Xreal(nargs, arg1, arg0)
8: int nargs;
9: struct descrip arg1, arg0;
10: {
11: double r;
12:
13: /*
14: * If x is already a real, just return it. Otherwise convert it and
15: * return it, failing if the conversion is unsuccessful.
16: */
17: DeRef(arg1)
18: if (!QUAL(arg1) && TYPE(arg1) == T_REAL)
19: arg0 = arg1;
20: else if (cvreal(&arg1, &r) == T_REAL)
21: mkreal(r, &arg0);
22: else
23: fail();
24: }
25:
26: Procblock(real,1)
Defined functions
Xreal
defined in line
7;
never used