Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
15
Task/Arrays/Phixmonti/arrays.phixmonti
Normal file
15
Task/Arrays/Phixmonti/arrays.phixmonti
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
include ..\Utilitys.pmt
|
||||
|
||||
0 tolist /# create an empty array/list. '( )' is equivalent #/
|
||||
drop /# remove top of the stack #/
|
||||
0 10 repeat /# put an array/list of 10 elements (each element has value 0) to the stack #/
|
||||
flush /# remove all elements. List is empty [] #/
|
||||
drop
|
||||
( 1 2 "Hello" pi ) /# put an initialize array/list to stack #/
|
||||
-7 1 set /# modified first element to -7 #/
|
||||
0 get /# get the last element. '-1 get' is equivalent #/
|
||||
drop
|
||||
( "next" "level" ) 2 put /# insert a list in a list = [-7, ["next", "level"], 2, "Hello", 3.141592653589793]] #/
|
||||
3 2 slice /# extract the subarray/sublist [ 2 "Hello" ] #/
|
||||
|
||||
pstack /# show the content of the stack #/
|
||||
Loading…
Add table
Add a link
Reference in a new issue