summaryrefslogtreecommitdiff
path: root/ipl/procs/inserts.icn
diff options
context:
space:
mode:
Diffstat (limited to 'ipl/procs/inserts.icn')
-rw-r--r--ipl/procs/inserts.icn26
1 files changed, 26 insertions, 0 deletions
diff --git a/ipl/procs/inserts.icn b/ipl/procs/inserts.icn
new file mode 100644
index 0000000..f24cbb5
--- /dev/null
+++ b/ipl/procs/inserts.icn
@@ -0,0 +1,26 @@
+############################################################################
+#
+# File: inserts.icn
+#
+# Subject: Procedures to build tables with duplicate keys
+#
+# Author: Robert J. Alexander
+#
+# Date: September 7, 1990
+#
+############################################################################
+#
+# This file is in the public domain.
+#
+############################################################################
+#
+# inserts() -- Inserts values into a table in which the same key can
+# have more than one value (i.e., duplicate keys). The value of each
+# element is a list of inserted values. The table must be created
+# with default value &null.
+#
+
+procedure inserts(tabl,key,value)
+ (/tabl[key] := [value]) | put(tabl[key],value)
+ return tabl
+end