home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 24 / CD_ASCQ_24_0995.iso / vrac / homonlib.zip / ISTR.BAS < prev    next >
BASIC Source File  |  1995-04-13  |  962b  |  43 lines

  1. DEFINT A-Z
  2.  
  3. DECLARE FUNCTION Dstr$ (d#)
  4. DECLARE FUNCTION Istr$ (i)
  5. DECLARE FUNCTION Lstr$ (l&)
  6. DECLARE FUNCTION Sstr$ (s!)
  7.  
  8. '****************************************************************************
  9. 'These functions simply make a string of a number and trim the leading space
  10. ' off of it.  The four differenct functions are for the different numeric
  11. ' variable types: Double precision, Integer, Long integer and Single
  12. ' precision.
  13. '
  14. 'They are not very complicated, but since I use the combination of LTRIM$()
  15. ' and STR$() so often, I might as well make my life easier.
  16. '
  17. '****************************************************************************
  18.  
  19. FUNCTION Dstr$ (d#)
  20.  
  21.      Dstr$ = LTRIM$(STR$(d#))
  22.  
  23. END FUNCTION
  24.  
  25. FUNCTION Istr$ (i)
  26.     
  27.      Istr$ = LTRIM$(STR$(i))
  28.  
  29. END FUNCTION
  30.  
  31. FUNCTION Lstr$ (l&)
  32.  
  33.      Lstr$ = LTRIM$(STR$(l&))
  34.  
  35. END FUNCTION
  36.  
  37. FUNCTION Sstr$ (s!)
  38.  
  39.      Sstr$ = LTRIM$(STR$(s!))
  40.  
  41. END FUNCTION
  42.  
  43.