home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 13 / AACD13.ISO / AACD / Utilities / QuickFile / ARexx / FixQuotes.quickfile < prev    next >
Text File  |  2000-05-26  |  547b  |  29 lines

  1. /*
  2. $VER: FixQuotes.quickfile 1.2 (26 May 2000  14:46:51) by M Andre Z Eckenrode
  3.  
  4. External function for QuickFile macros; replaces single- and double-quote marks
  5. in strings to be passed to QuickFile commands with '\xxx' ASCII codes.
  6.  
  7. Requires QuickFile v3.24 or higher, and a single argument containing the string
  8. to be modified.
  9.  
  10. Returns the modified string.
  11. */
  12.  
  13. str = arg(1)
  14.  
  15. q.1 = "'"
  16. q.2 = '"'
  17. a.1 = 9
  18. a.2 = 4
  19.  
  20. do i = 1 to 2
  21.     q = pos(q.i,str)
  22.     do while q > 0
  23.         str = insert('03'a.i,overlay('\',str,q),q)
  24.         q = pos(q.i,str)
  25.     end
  26. end
  27.  
  28. return str
  29.