2 insert - insert one or more elements into a list at a given position
5 insert(x, y, z_0, z_1, ...)
8 x lvalue whose value is a list
15 If after evaluation of z_0, z_1, ..., x is a list with contents
16 (x_0, x_1, ..., x_y-1, x_y, ..., x_n-1), then after insert(),
17 x has contents (x_0, x_1, ..., x_y-1, z_0, z_1, ..., x_y, ..., x_n-1),
18 i.e. z_0, z_1, ... are inserted in order immediately before the
19 element with index y (so that z_0 is now x[[y]]), or if y = n,
20 after the last element x_n-1. An error occurs if y > n.
26 list (3 elements, 3 nonzero):
34 list (5 elements, 5 nonzero):
41 ; insert(A, 2, remove(A))
44 list (5 elements, 5 nonzero):
52 insert() can have at most 100 arguments
59 append, delete, islist, pop, push, remove, rsearch, search,
62 ## Copyright (C) 1999-2006 Landon Curt Noll
64 ## Calc is open software; you can redistribute it and/or modify it under
65 ## the terms of the version 2.1 of the GNU Lesser General Public License
66 ## as published by the Free Software Foundation.
68 ## Calc is distributed in the hope that it will be useful, but WITHOUT
69 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
70 ## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
71 ## Public License for more details.
73 ## A copy of version 2.1 of the GNU Lesser General Public License is
74 ## distributed with calc under the filename COPYING-LGPL. You should have
75 ## received a copy with calc; if not, write to Free Software Foundation, Inc.
76 ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
78 ## @(#) $Revision: 30.1 $
79 ## @(#) $Id: insert,v 30.1 2007/03/16 11:10:42 chongo Exp $
80 ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/insert,v $
82 ## Under source code control: 1994/03/19 03:13:18
83 ## File existed as early as: 1994
85 ## chongo <was here> /\oo/\ http://www.isthe.com/chongo/
86 ## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/