home *** CD-ROM | disk | FTP | other *** search
- ############################################################################
- #
- # File: rec2tab.icn
- #
- # Subject: Procedure to write record as tab-separated string
- #
- # Author: Ralph E. Griswold
- #
- # Date: September 2, 1991
- #
- ###########################################################################
- #
- # This procedure writes fields of a record as tab-separated string.
- # Carriage returns in files are converted to vertical tabs.
- # (Works for lists too.)
- #
-
- procedure rec2tab(x)
- local i
-
- i := *x - 1
- every writes(map(!x, "\n", "\v"),"\t") \ i
- write(map(x[-1], "\n", "\v"))
-
- return
-
- end
-