/usr/share/calc/help/list is in apcalc-common 2.12.4.4-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | NAME
list - create list of specified values
SYNOPSIS
list([x, [x, ... ]])
TYPES
x any, &any
return list
DESCRIPTION
This function returns a list that is composed of the arguments x.
If no args are given, an empty list is returned.
Lists are a sequence of values which are doubly linked so that
elements can be removed or inserted anywhere within the list.
The function 'list' creates a list with possible initial elements.
For example,
x = list(4, 6, 7);
creates a list in the variable x of three elements, in the order
4, 6, and 7.
The 'push' and 'pop' functions insert or remove an element from
the beginning of the list. The 'append' and 'remove' functions
insert or remove an element from the end of the list. The 'insert'
and 'delete' functions insert or delete an element from the middle
(or ends) of a list. The functions which insert elements return
the null value, but the functions which remove an element return
the element as their value. The 'size' function returns the number
of elements in the list.
Note that these functions manipulate the actual list argument,
instead of returning a new list. Thus in the example:
push(x, 9);
x becomes a list of four elements, in the order 9, 4, 6, and 7.
Lists can be copied by assigning them to another variable.
An arbitrary element of a linked list can be accessed by using the
double-bracket operator. The beginning of the list has index 0.
Thus in the new list x above, the expression x[[0]] returns the
value of the first element of the list, which is 9. Note that this
indexing does not remove elements from the list.
Since lists are doubly linked in memory, random access to arbitrary
elements can be slow if the list is large. However, for each list
a pointer is kept to the latest indexed element, thus relatively
sequential accesses to the elements in a list will not be slow.
Lists can be searched for particular values by using the 'search'
and 'rsearch' functions. They return the element number of the
found value (zero based), or null if the value does not exist in
the list.
EXAMPLE
; list(2,"three",4i)
list (3 elements, 3 nonzero):
[[0]] = 2
[[1]] = "three"
[[2]] = 4i
; list()
list (0 elements, 0 nonzero)
LIMITS
none
LINK LIBRARY
none
SEE ALSO
append, delete, insert, islist, pop, push, remove, rsearch, search, size
## Copyright (C) 1999 Landon Curt Noll
##
## Calc is open software; you can redistribute it and/or modify it under
## the terms of the version 2.1 of the GNU Lesser General Public License
## as published by the Free Software Foundation.
##
## Calc is distributed in the hope that it will be useful, but WITHOUT
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
## Public License for more details.
##
## A copy of version 2.1 of the GNU Lesser General Public License is
## distributed with calc under the filename COPYING-LGPL. You should have
## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
##
## @(#) $Revision: 30.1 $
## @(#) $Id: list,v 30.1 2007/03/16 11:10:42 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/list,v $
##
## Under source code control: 1994/03/19 03:13:19
## File existed as early as: 1994
##
## chongo <was here> /\oo/\ http://www.isthe.com/chongo/
## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/
|