home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a069 / 1.img / TRSOURCE.EXE / ABS.C < prev    next >
Encoding:
C/C++ Source or Header  |  1990-10-22  |  399 b   |  21 lines

  1. /*********
  2. * ABS.C
  3. * by Leonard Zerman
  4. * Placed in the public domain by Tom Rettig Associates, 10/22/1990.
  5. *
  6. * Syntax: ABS( <expN> )
  7. * Return: The absolute value of <expN>
  8. * Note  : Change negative number to positive.
  9. ********/
  10.  
  11. #include "trlib.h"
  12.  
  13. TRTYPE abs()
  14. {
  15.    if ( PCOUNT==1 && ISNUM(1) )
  16.       _retnd(ABS(_parnd(1))) ;
  17.    else
  18.       _retnd( (double)ERROR ) ;
  19. }
  20. /* eof */
  21.