############################################################################
#
# File: tab2rec.icn
#
# Subject: Procedure to put tab-separated strings in records
#
# Author: Ralph E. Griswold
#
# Date: February 16, 2001
#
############################################################################
#
# This file is in the public domain.
#
############################################################################
#
# This procedure to takes tab-separated strings and inserts them
# into fields of a record.
#
# Vertical tabs in strings are converted to carriage returns.
#
# (Works for lists too.)
#
############################################################################
procedure tab2rec(s, x)
local i
i := 0
s ? {
while x[i +:= 1] := map(tab(upto('\t') | 0), "\v", "\n") do
move(1) | break
}
return
end
This page produced by UniDoc on 2021/04/15 @ 23:59:45.