1: #include "../h/rt.h"
   2: 
   3: /*
   4:  * cvreal - convert to real and put the result into *r.
   5:  */
   6: 
   7: cvreal(d, r)
   8: register struct descrip *d;
   9: double *r;
  10:    {
  11:    union numeric result;
  12: 
  13:    /*
  14:     * Use cvnum to classify the value.  Cast integers into reals and
  15:     *  fail if the value is non-numeric.
  16:     */
  17:    switch (cvnum(d, &result)) {
  18:       case T_LONGINT:
  19:          *r = result.integer;
  20:          return (T_REAL);
  21: 
  22:       case T_REAL:
  23:          *r = result.real;
  24:          return (T_REAL);
  25: 
  26:       default:
  27:          return (NULL);
  28:       }
  29:    }

Defined functions

cvreal defined in line 7; never used
Last modified: 1984-11-18
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 723
Valid CSS Valid XHTML 1.0 Strict