home *** CD-ROM | disk | FTP | other *** search
/ Lion Share / lionsharecd.iso / utils_mz / v10n03.zip / MAKENUM < prev    next >
Text File  |  1991-01-03  |  438b  |  23 lines

  1.  
  2. * Procedure to strip all non-numeric characters
  3. * from a string.  Note, if string has a minus
  4. * sign, it too will be stripped.
  5. *
  6. PROCEDURE MAKENUM
  7. PARAMETERS string
  8. PRIVATE nums, newstring, x, slen
  9. nums="0123456789"
  10. newstring=""
  11. x = 1
  12. slen = LEN(string)
  13. DO WHILE x <= slen
  14.   IF AT(SUBSTR(string,x,1),nums) <> 0)
  15.      newstring = newstring + SUBSTR(string,x,1)
  16.   ENDIF
  17.   X = X + 1
  18. ENDDO
  19. string = newstring
  20. RETURN
  21.  
  22.  
  23.