home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / OL.LZH / PROCS.LZH / REC2TAB.ICN < prev    next >
Text File  |  1991-09-05  |  622b  |  28 lines

  1. ############################################################################
  2. #
  3. #    Name:    rec2tab.icn
  4. #
  5. #    Title:    Write record fields as tab-separated string
  6. #
  7. #    Author:    Ralph E. Griswold
  8. #
  9. #    Date:    September 2, 1991
  10. #
  11. ############################################################################
  12. #
  13. #  This procedure writes fields of a record as tab-separated string.
  14. #  Carriage returns in files are converted to vertical tabs.
  15. #  (Works for lists too.)
  16. #
  17.  
  18. procedure rec2tab(x)
  19.    local i
  20.  
  21.    i := *x - 1
  22.    every writes(map(!x, "\n", "\v"),"\t") \ i
  23.    write(map(x[-1], "\n", "\v"))
  24.  
  25.    return
  26.  
  27. end
  28.