diff options
Diffstat (limited to 'ipl/procs/tab2list.icn')
-rw-r--r-- | ipl/procs/tab2list.icn | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/ipl/procs/tab2list.icn b/ipl/procs/tab2list.icn new file mode 100644 index 0000000..6d9a9df --- /dev/null +++ b/ipl/procs/tab2list.icn @@ -0,0 +1,42 @@ +############################################################################ +# +# File: tab2list.icn +# +# Subject: Procedure to put tab-separated strings in list +# +# Author: Ralph E. Griswold +# +# Date: January 3, 1994 +# +############################################################################ +# +# This file is in the public domain. +# +############################################################################ +# +# This procedure to takes tab-separated strings and inserts them +# into a list. +# +# Vertical tabs in strings are converted to carriage returns. +# +# (Works for lists too.) +# +############################################################################ +# +# See also: list2tab.icn, tab2rec.icn, rec2tab.icn +# +############################################################################ + +procedure tab2list(s) + local L + + L := [] + + s ? { + while put(L, map(tab(upto('\t') | 0), "\v", "\n")) do + move(1) | break + } + + return L + +end |