mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
Release calc version 2.10.2t30
This commit is contained in:
44
help/delete
Normal file
44
help/delete
Normal file
@@ -0,0 +1,44 @@
|
||||
NAME
|
||||
delete - delete an element from a list at a given position
|
||||
|
||||
SYNOPSIS
|
||||
delete(lst, idx)
|
||||
|
||||
TYPES
|
||||
lst list, &list
|
||||
idx int, &int
|
||||
|
||||
return any
|
||||
|
||||
DESCRIPTION
|
||||
Delete element at index idx from list lst.
|
||||
|
||||
The index must refer to an element in the list. That is, idx must
|
||||
be in the range [0, size(lst)-1].
|
||||
|
||||
EXAMPLE
|
||||
> lst = list(2,3,4,5)
|
||||
|
||||
list (4 elements, 4 nonzero):
|
||||
[[0]] = 2
|
||||
[[1]] = 3
|
||||
[[2]] = 4
|
||||
[[3]] = 5
|
||||
|
||||
> delete(lst, 2)
|
||||
4
|
||||
> print lst
|
||||
|
||||
list (3 elements, 3 nonzero):
|
||||
[[0]] = 2
|
||||
[[1]] = 3
|
||||
[[2]] = 5
|
||||
|
||||
LIMITS
|
||||
none
|
||||
|
||||
LIBRARY
|
||||
none
|
||||
|
||||
SEE ALSO
|
||||
append, insert, islist, list, pop, push, remove, rsearch, search, size
|
Reference in New Issue
Block a user