Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
15
Task/Arrays/EMal/arrays.emal
Normal file
15
Task/Arrays/EMal/arrays.emal
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
^|EMal has dynamic lists.
|
||||
|Lists have differen API to change the value in-place or not.
|
||||
|SQL like name: insert, append, delete, order alter the current list.
|
||||
|There are methods that operate on indexes, other on values.
|
||||
|^
|
||||
List a = int[] # a:[]
|
||||
a.append(8) # a:[8]
|
||||
a.insert(1, 13) # a:[8,13]
|
||||
a.delete(0) # a:[13]
|
||||
a.clear() # a:[]
|
||||
a.of(21, 33) # a:[21,33]
|
||||
a[1] = 34 # a:[21,34]
|
||||
List b = a.remove(21) # a:[21, 34], b:[34]
|
||||
writeLine("a has " + a.length + " items, their values are " + a[0] + ", " + a[1])
|
||||
writeLine("b has " + b.length + " item, its value is " + b[0])
|
||||
Loading…
Add table
Add a link
Reference in a new issue