遍历数组返回索引,可用于遍历树形结构并返回所有分支路径

遍历数组返回索引,可用于遍历树形结构并返回所有分支路径

Array:=[]
Array["A1","B1","C1"]:=1
Array["A1","B1","C2","D1"]:=2
Array["A1","B1","C2","D2","E1"]:=3
Array["A1","B1","C3","D1","E1"]:=4
Array["A1","B1","C3","D1","E2"]:=5
Array["A1","B1","C3","D1","E3"]:=6
Array["A1","B1","C3","D1","E4"]:=7
Array["A1","B2"]:=8
Array["A2","B1","C1","D1","E1"]:=9
Array["A3"]:=10
Array["A4","B1"]:=11
MsgBox % ForArray(Array)
ForArray(obj, N:="")
{
	for Key, Value in obj
	{
		L := (N?N . ",":"obj[") . Key
		S .= (IsObject(Value)?ForArray(Value,L):L . "]:=" . Value . "`n")
	}
	return S
}

给TA捐赠
共{{data.count}}人
人已捐赠
其他案例

KMCount 1.0 键鼠统计

2021-3-14 17:46:40

其他

电子文件存储方案20210318

2021-3-18 17:12:06

2 条回复 A文章作者 M管理员
  1. hexuren

    干的不错,安安静静学习的还真是不多

  2. 哦哦耶

    安安静静学习

个人中心
购物车
优惠劵
有新私信 私信列表
搜索