递归在类中的写法

struct ioo 
(
	toto =#(),
	fn getbonename nodep =
	(
		kong =#()
		if nodep.children.count > 0 then 
		(
			for i in  nodep.children do 
			(
			append toto i.name
			append kong i 
			)
		)
		if kong.count>0 then 
		(
			for i in kong do 
			(
				getbonename i
			)
		)
	),
	-- 下面进行调用 返回
	fn getbone  nodep  =
	(
		toto =#()
		getbonename nodep 
		return toto 
	)
)

op = ioo()

op.getbone  $



原文地址:https://www.cnblogs.com/gaitian00/p/2582477.html