[Turn on line numbering]arg dict, key, elem; var value; // Add an element to the list value of a dictionary key value = (| dict[key] |); if (type(value) != 'list && type(value) != 'error) throw(~type, "Value for key " + key + " (" + value + ") is not a list."); anticipate_assignment(); if (value) { // reduce references to 'value' dict = dict_add(dict, key, 0); value += [elem]; } else { value = [elem]; } return dict_add(dict, key, value);
// Created 27-Mar-1995 as a part of ColdCore, see: @help Credit