home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / basic / library / qb_pds / quicksub / blanks.asc next >
Encoding:
Text File  |  1986-06-12  |  640 b   |  18 lines

  1. ' BLANKS.ASC -- QuickBASIC program demonstrates a user-defined function
  2. '        that strips leading & trailing blanks on numbers.
  3. ' This isn't mine - I don't know who wrote it
  4.  
  5.     DEF FNSTRIP$(Z) = MID$(STR$(Z) , 2 + (Z < 0))
  6.  
  7.     ' Demonstration of FNSTRIP$()
  8.     LOCATE 4 , 27
  9.     FENCE$ = CHR$(219) + CHR$(219)
  10.     PRINT "BLANK STRIPPER DEMO"
  11.     LOCATE 6 , 18
  12.     FOR  A = -1 TO 1 STEP .5
  13.         PRINT TAB(18) "Before: ";FENCE$; A; FENCE$;
  14.         PRINT TAB(40) "After: ";FENCE$; FNSTRIP$(A); FENCE$
  15.     NEXT
  16.  
  17. ' >>>>> Physical EOF BLANKS.ASC
  18.