From 4cae70d8cbd4fd20452aa07c0900bee8de1953eb Mon Sep 17 00:00:00 2001 From: TudbuT Date: Mon, 2 May 2022 10:06:35 +0200 Subject: [PATCH] add array shadow --- std.isbpl | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/std.isbpl b/std.isbpl index 77174e1..39699ef 100644 --- a/std.isbpl +++ b/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 +}