home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 13 / CD_ASCQ_13_0494.iso / maj / 419 / numform.bas < prev    next >
BASIC Source File  |  1994-03-13  |  669b  |  15 lines

  1. '   +----------------------------------------------------------------------+
  2. '   |                                                                      |
  3. '   |        PBClone  Copyright (c) 1990-1994  Thomas G. Hanlin III        |
  4. '   |                                                                      |
  5. '   +----------------------------------------------------------------------+
  6.  
  7. SUB NumFormat (FormatSt$, Number#, Result$)
  8.    Handle% = FREEFILE
  9.    OPEN "NUL" FOR RANDOM AS #Handle%
  10.    FIELD #Handle%, 128 AS Foo$
  11.    PRINT #Handle%, USING FormatSt$ + CHR$(255); Number#;
  12.    Result$ = LEFT$(Foo$, INSTR(Foo$, CHR$(255)) - 1)
  13.    CLOSE Handle%
  14. END SUB
  15.