home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Multimedia / Resource Library: Multimedia.iso / hypercrd / xcmds / dvlprstc.hqx / Developer Stack 1.3r / card_33077.txt < prev    next >
Encoding:
Text File  |  1991-04-30  |  1.1 KB  |  41 lines

  1. -- card: 33077 from stack: in.3r
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 3837
  5. -- name: StripNum
  6.  
  7.  
  8. -- part contents for background part 10
  9. ----- text -----
  10. 45
  11.  
  12. -- part contents for background part 5
  13. ----- text -----
  14. StripNum
  15.  
  16. -- part contents for background part 6
  17. ----- text -----
  18. This is an XFCN that takes a string and strips everything out that would interfere with math calculations in HyperCard. It will leave a leading minus sign a decimal point and the numbers 0 through 9.
  19.  
  20. This is free. All I ask is to be notified of any suggestions or bugs found, and a credit line if you use it in released stacks. C source available on request.
  21.  
  22. Copyright 1988. All rights reserved.
  23. Dwight Mayo
  24. GEnie, MacNet - DMAYO
  25. Compuserve - 76257,3303
  26.  
  27.  
  28.  
  29. -- part contents for background part 27
  30. ----- text -----
  31. XFCN
  32.  
  33. -- part contents for background part 7
  34. ----- text -----
  35. Syntax:
  36.  
  37. StripNum(Value)
  38.   
  39. Value can be any string of characters. StripNum will strip any char that is not between 0 and 9. It will leave a leading minus sign (i.e., if the minus sign is the first character) and  a decimal point, 
  40. (i.e. -####.####)
  41.