回复 20楼 csyx
哈哈!是的,这个比喻好形象
[此贴子已经被作者于2022-7-14 18:42编辑过]
Lparameters oNode,tcSelectKey Local oCurNode,ChildKey a = Alltrim(oNode.Key) Messagebox(a+tcSelectKey,0,"") If a == Alltrim(tcSelectKey) Messagebox("相同了,找到啦!",0,"") Return .F. &&这里应该退出了,并返回.T.,但是还是会继续下去,直至最后 Endif If oNode.Children > 0 oCurNode = oNode.Child Do While !Isnull(oCurNode) and This.findTreeNode(oCurNode,tcSelectKey) oCurNode = oCurNode.Next Enddo Endif
[此贴子已经被作者于2022-7-14 20:18编辑过]
[此贴子已经被作者于2022-7-14 20:27编辑过]
Lparameters oNode,tcSelectKey Local oCurNode,ChildKey,isIndetical isIdentical = .F. *ChildKey = oNode.Key a = Alltrim(oNode.Key) Messagebox(a+tcSelectKey,0,"") If a == Alltrim(tcSelectKey) isIndetical = .T. Messagebox("相同了,找到啦!",0,"") isCheck = .T. &&加了这个 Return isIndetical Endif If oNode.Children > 0 oCurNode = oNode.Child Do While !Isnull(oCurNode) If isCheck = .t. &&判断 Exit Else This.findTreeNode(oCurNode,tcSelectKey) oCurNode = oCurNode.Next EndIf Enddo Endif Return isIndetical
[此贴子已经被作者于2022-7-14 20:42编辑过]