add array shadow
This commit is contained in:
parent
8d5181886c
commit
4cae70d8cb
1 changed files with 26 additions and 0 deletions
26
std.isbpl
26
std.isbpl
|
@ -423,3 +423,29 @@ func struppercase {
|
|||
func main {
|
||||
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
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue