手机站
网通分站
电信主站
密 码:
用户名:
当前位置 : 主页>网络编程>Asp.Net编程>列表

循环链表以及相关操作(VB实现)

来源:互联网 作者:西部数码 时间:2008-04-10
西部数码-全国虚拟主机10强!40余项虚拟主机管理功能,全国领先!双线多线虚拟主机南北访问畅通无阻!免费赠送企业邮局,.CN域名,自助建站480元起,免费试用7天,满意再付款! P4主机租用799元/月.月付免压金!

pointer.count = counts
If ObjPtr(pointer.nextnode) = ObjPtr(head) Then
Exit Do
End If
Loop While Not pointer Is Nothing
End If
End Sub

Private Sub konglianbiao_Click()
Set pointer = head
Do
Set pointer = pointer.nextnode
If ObjPtr(pointer.nextnode) = ObjPtr(head) Then
Set pointer.nextnode = Nothing
Set n = New node
Set n = pointer
End If
DoEvents
Loop While Not pointer.nextnode Is Nothing
Do
Set pointer = head
Set head = head.nextnode
Set pointer = Nothing
If ObjPtr(head) = ObjPtr(n) Then
Set head = Nothing
Set n = Nothing
End If
DoEvents
Loop While Not head Is Nothing
Form1.Cls
End Sub
Private Sub leave_Click()
End
End Sub
Private Sub print_Click()
Set pointer = head
If head Is Nothing Then
MsgBox "链表为空"
Else
While Not pointer Is Nothing
Print pointer.x
Set pointer = pointer.nextnode
If ObjPtr(pointer) = ObjPtr(head) Then ''''objptr返回对象的地址
Exit Sub ''''strptr返回变长字符串的字符串数据地址
End If ''''varptr返回变量的地址
DoEvents ''''用与获取变量地址,是函数。
Wend
End If
End Sub
该代码在VB6.0 WINME中调试通过。

文章整理:西部数码--专业提供域名注册虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!