modified: diffout.py
[GalaxyCodeBases.git] / c_cpp / etc / calc / help / remove
blob339809de424cbfe0a7760efe8525b374897e5f8b
1 NAME
2     remove - remove the last member of a list
4 SYNOPSIS
5     remove(lst)
7 TYPES
8     lst         lvalue whose current value is a list
10     return      any
12 DESCRIPTION
13     If lst has no members, remove(lst) returns the null value and does
14     not change lst.
16     If lst has n members where n > 0, remove(lst) returns the value of
17     lst[[n-1]] and deletes this value from the end of the lst, so that
18     lst now has n - 1 members and for 0 <= i < n - 1, lst[[i]] returns
19     what it would have returned before the remove operation.
21 EXAMPLE
22     ; lst = list(2,"three")
24     list (2 elements, 2 nonzero):
25       [[0]] = 2
26       [[1]] = "three"
28     ; remove(lst)
29             "three"
30     ; print lst
32     list (1 elements, 1 nonzero):
33       [[0]] = 2
35     ; remove(lst)
36             2
37     ; print lst
38     list (0 elements, 0 nonzero)
39     ; remove(lst)
40     ; print lst
41     list (0 elements, 0 nonzero)
43 LIMITS
44     none
46 LINK LIBRARY
47     none
49 SEE ALSO
50      append, delete, insert, islist, pop, push, rsearch, search,
51      select, size
53 ## Copyright (C) 1999-2006  Landon Curt Noll
55 ## Calc is open software; you can redistribute it and/or modify it under
56 ## the terms of the version 2.1 of the GNU Lesser General Public License
57 ## as published by the Free Software Foundation.
59 ## Calc is distributed in the hope that it will be useful, but WITHOUT
60 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
61 ## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General
62 ## Public License for more details.
64 ## A copy of version 2.1 of the GNU Lesser General Public License is
65 ## distributed with calc under the filename COPYING-LGPL.  You should have
66 ## received a copy with calc; if not, write to Free Software Foundation, Inc.
67 ## 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
69 ## @(#) $Revision: 30.1 $
70 ## @(#) $Id: remove,v 30.1 2007/03/16 11:10:42 chongo Exp $
71 ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/remove,v $
73 ## Under source code control:   1996/03/12 23:10:01
74 ## File existed as early as:    1996
76 ## chongo <was here> /\oo/\     http://www.isthe.com/chongo/
77 ## Share and enjoy!  :-)        http://www.isthe.com/chongo/tech/comp/calc/