type a a as long b as string * 10 end typedim aa as a open "" for binary as #1 put #1,,a close #1
to subzero(赘姆烂壳): 怎么读呢? to lanslotliu(网络插件) : 结构数组是: type Pesas
to lanslotliu(网络插件) : 结构数组是: Type Person ID As Integer MonthlySalary As Currency LastReviewDate As Long FirstName As String LastName As String Title As String ReviewComments As String End TypePublic Empl() As Person '定义记录。
Private Type MyType Dim intID As Long Dim strName As String*32 End TypePrivate Sub SaveToFile(ByVal strFile As String) Dim lFN As Long Dim tarrData() As MyType Redim tarrData(2) As MyType tarrData(0).intID=1 tarrData(0).strName="Name1" tarrData(1).intID=2 tarrData(1).strName="Name2" tarrData(2).intID=3 tarrData(2).strName="Name3" lFN=FreeFile() Open strFile For Binary As #lFN Put #lFN,,tarrData Close #lFN End Sub
type a a as long b as string * 10 end typedim aa as a open "" for binary as #1 get #1,,a close #1
a as long
b as string * 10
end typedim aa as a
open "" for binary as #1
put #1,,a
close #1
怎么读呢?
to lanslotliu(网络插件) :
结构数组是:
type Pesas
结构数组是:
Type Person
ID As Integer
MonthlySalary As Currency
LastReviewDate As Long
FirstName As String
LastName As String
Title As String
ReviewComments As String
End TypePublic Empl() As Person '定义记录。
Dim intID As Long
Dim strName As String*32
End TypePrivate Sub SaveToFile(ByVal strFile As String)
Dim lFN As Long
Dim tarrData() As MyType Redim tarrData(2) As MyType
tarrData(0).intID=1
tarrData(0).strName="Name1"
tarrData(1).intID=2
tarrData(1).strName="Name2"
tarrData(2).intID=3
tarrData(2).strName="Name3"
lFN=FreeFile()
Open strFile For Binary As #lFN
Put #lFN,,tarrData
Close #lFN
End Sub
a as long
b as string * 10
end typedim aa as a
open "" for binary as #1
get #1,,a
close #1