• VB二进制文件读写


    数组存取
     

    存数组
    Private Sub Command2_Click()
    Dim fileNumber As Integer
    Dim S9 As String
    Dim k As Integer
    Dim l As Integer
     
    On Error Resume Next
    fileNumber = FreeFile()
    S9 = "D:zs.txt"
    If Dir(S9) <> "" Then Kill S9
    Open S9 For Binary As #fileNumber
    k = UBound(arr)
    Put #fileNumber, , k
    Put #fileNumber, , arr
    l = UBound(azz)
    Put #fileNumber, , l
    Put #fileNumber, , azz
    Close #fileNumber
     
    End Sub

    读数组
    Private Sub Command3_Click()
    Dim fileNumber As Integer
    Dim S9 As String
    Dim k As Integer
    Dim l As Integer
    Dim ayy() As Integer
    Dim akk() As Integer
    On Error Resume Next
    fileNumber = FreeFile()
    S9 = "D:zs.ini"
    Open S9 For Binary As #fileNumber
    Get #fileNumber, , k
    ReDim ayy(k)
    Get #fileNumber, , ayy
    Get #fileNumber, , l
    ReDim akk(l)
    Get #fileNumber, , akk
    Close #fileNumber
     
    End Sub
    结构体读写
  • 相关阅读:
    Tools
    Python
    Python
    Python
    Python
    Python
    linux下搭建SVN服务器完全手册【摘抄】
    XPath学习:轴(14)——总结
    XPath学习:parent,child
    使用Xpath对XML进行模糊查询
  • 原文地址:https://www.cnblogs.com/wuyuxin/p/7017347.html
Copyright © 2020-2023  润新知