APPEND
APPEND a, var1 [, var2 [, …, varN]]
Inserts the values var1
to varN
at the end
of the array a
. var1
to varN
can
be any data type.
Instead of APPEND the <<
Operator can be used.
Example 1: Append single number
1,2,3]
a = [print "Before APPEND: "; a
APPEND a, 4
print "After APPEND : "; a
' Output:
' Before APPEND: [1,2,3]
' After APPEND : [1,2,3,4]
Example 2: Append multiple numbers
1,2,3]
a = [
APPEND a, 4, 5
print a ' Output: [1,2,3,4,5]
Example 3: Append an array
1,2,3]
a = [
APPEND a, [4,5,6]
print a ' Output: [1,2,3,[4,5,6]]
Example 4: Append a string
"a", "b", "c"]
a = [
APPEND a, "d"
print a ' Output: [a,b,c,d]
Example 5: Using << operator
1,2,3]
a = [
4
a << print a ' Output: [1,2,3,4]
Code samples using APPEND
Data
APPEND
ARRAY
DATA
DELETE
DIM
EMPTY
ERASE
INSERT
ISARRAY
ISDIR
ISFILE
ISLINK
ISMAP
ISNUMBER
ISSTRING
LBOUND
LEN
READ
REDIM
RESTORE
SEARCH
SORT
SWAP
UBOUND
If there is insufficient information on this page and you wish learn more about APPEND,
please send an email to smallbasic@gmail.com. You can help to improve information about
APPEND by submitting a pull request,
click View Source for details. Note, an offline language reference text file is also available - see the Download section.