Eof Function
ཡིག་སྣོད་ཀྱི་མཇུག་ལུ་བདའ་ཟུན་ཡོད་པ་ཅིན་ཡིག་སྣོད་དཔག་བྱེད་འདི་གཏན་འབེབས་བཟོཝ་ཨིན།
ཨི་གི (intexpression As Integer)
བུལ།
ཨིནཊི་གསལ་བརྗོད: ཧྲིལ་ཨང་གསལ་བརྗོད་གང་རུང་ ཡིག་སྣོད་ཀུན་གྱི་ཨང་གྲངས་ལུ་བརྟག་ཞིབ་འབདཝ་ཨིན།
ཁྱོད་ཀྱིས་ཡིག་སྣོད་ཀྱི་མཇུག་ཨིན་པུཊི་ལེན་ནི་ལུ་དཔའ་བཅམ་མིའི་སྐབས་འཛོལ་བ་ཚུ་ཟུར་ནི་ལུ་ ཨི་ཨོ་ཨེཕ་་ལག་ལེན་འཐབ། ཁྱོད་ཀྱིས་ཨིན་པུཊི་ ཡང་ན་ལེན་གསལ་བཤད་་ཡིག་སྣོད་ལས་ལྷག་ནི་ལུ་ལག་ལེན་འཐབ་ད་ ཡིག་སྣོད་དཔག་བྱེད་དེ་ བཱའིཊིསི་ལྷག་ནི་གི་ཨང་གིས་འབད་རྔ་གཡར་འབད་ཡོདཔ་ཨིན། ཡིག་སྣོད་དེ་གི་མཇུག་དེ་ལྷོདཔ་ད་ ཨི་ཨོ་ཨེཕ་གིས་གནས་གོང་ "True" (-༡)སླར་ལོགཔ་ཨིན།
༥ ནུས་མེད་བྱ་སྒོའི་ལམ་ལུགས་བོད་བརྡ་
༥༢ བྱང་ཉེས་ཡིག་སྣོད་མིང་ཡང་ན་ཨང་གྲངས་
Sub ExampleWorkWithAFile
Dim iNumber As Integer
Dim sLine As String
Dim aFile As String
Dim sMsg As String
aFile = "C:\Users\ThisUser\data.txt"
iNumber = Freefile
Open aFile For Output As #iNumber
དཔར་བསྐྲུན་འབད#ཨའི་ཨང་ "This is a line of text"
#ཨའི་ཨང་དཔར་བསྐྲུན་འབད། "This is another line of text"
Close #iNumber
iNumber = Freefile
Open aFile For Input As iNumber
While Not eof(iNumber)
Line Input #iNumber, sLine
If sLine <>"" Then
sMsg = sMsg & sLine & chr(13)
End If
Wend
Close #iNumber
MsgBox sMsg
End Sub
Sub ExampleWorkWithAFile
Dim iNumber As Integer
Dim sLine As String
Dim aFile As String
Dim sMsg As String
aFile = "~/data.txt"
iNumber = Freefile
Open aFile For Output As #iNumber
Print #iNumber, "This is a line of text"
Print #iNumber, "This is another line of text"
Close #iNumber
iNumber = Freefile
Open aFile For Input As iNumber
While Not eof(iNumber)
Line Input #iNumber, sLine
If sLine <>"" Then
sMsg = sMsg & sLine & chr(13)
End If
Wend
Close #iNumber
MsgBox sMsg
End Sub