add array shadow

This commit is contained in:
Daniella / Tove 2022-05-02 10:06:35 +02:00
parent 8d5181886c
commit 4cae70d8cb

View file

@ -423,3 +423,29 @@ func struppercase {
func main { func main {
pop 0 pop 0
} }
func aadd {
def arr2 =arr2
def arr1 =arr1
def new arr1 alen arr2 alen + anew =new
arr1 new 0 0 arr1 alen acopy =new
arr2 new 0 arr1 alen arr2 alen acopy =new
new
}
def TYPE_SHADOW "shadow" mktype =TYPE_SHADOW
func [ {
TYPE_ARRAY TYPE_SHADOW settype
}
func ] {
"create an array until arrayshadow is found" #
def array 0 anew =array
while { dup [ eq not } {
1 anewput array aadd =array
}
pop array
}