home *** CD-ROM | disk | FTP | other *** search
/ POINT Software Programming / PPROG1.ISO / pascal / swag / strings.swg / 0044_Convert REAL to STRING.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1993-09-26  |  825 b   |  24 lines

  1. {*****************************************************************************
  2.  * Function ...... RTOS()
  3.  * Purpose ....... To convert a REAL to a string
  4.  * Parameters .... nNum       REAL to convert to string format
  5.  *                 nLength    Length of resultant string
  6.  *                 nDec       Decimal places
  7.  * Returns ....... <nNum> as a string, <nLength> long to <nDec> decimal places
  8.  * Notes ......... None
  9.  * Author ........ Martin Richardson
  10.  * Date .......... May 13, 1992
  11.  *****************************************************************************}
  12. FUNCTION RTOS( nNum: REAL; nLength, nDec: INTEGER ): STRING;
  13. VAR
  14.    s: ^STRING;
  15. BEGIN
  16.      ASM  
  17.           mov     sp, bp 
  18.           push    ss
  19.           push    WORD PTR @RESULT
  20.      END;
  21.      STR( nNum:nLength:nDec, s^ );
  22. END;
  23.  
  24.