Eof Function

ཡིག་ཆའི་སྟོན་མདའ་ཡིག་ཆའི་མཇུག་ཏུ་སླེབས་མིན་གཏན་འཁེལ་བྱེད་པ།

བརྡ་འཕྲོད་


Eof (intexpression As Integer)

ཕྱིར་ལོག་ཐང་

པུའུ་འར་

ཁུགས་གྲངས་

Intexpression:ཁ་ཕྱེ་བའི་ཡིག་ཆའི་རྩིས་རྒྱག་གི་ཨང་སྒྲིག་གི་ཧྲིལ་གྲངས་གང་རུང་གི་མཚོན་ཚུལ་ལ་སྤྱོད་པ།

EOF རྟེན་གྲངས་སྤྱད་ནས་ནང་འཇུག་བྱེད་དུས་ཡིག་ཆའི་མཇུག་མཐའ་ལས་བརྒལ་བའི་ནོར་འཁྲུལ་ལས་གཡོགཡོ་ཆོག། ཁྱེད་ཀྱིས་ Input ཡང་ན་ Get བརྗོད་པའི་ཡིག་ཆ་ཀློག་འདོན་བྱེད་དུས་ ཡིག་ཆའི་སྟོན་མདའ་ཀློག་འདོན་བྱས་པའི་ཡིག་ཚེགས་ཀྱི་གྲངས་གཞིར་བཟུང་ནས་མདུན་ལ་སྤོ་འགུལ་བྱེད་དོ། EOFཕྱིར་ལོག་ "True" (-1)

Error codes:

5 ནུས་མེད་ཀྱི་བརྒྱུད་རིམ་འཁོར་སྤྱོད་

52 ནོར་བའི་ཡི་ཆའི་མིང་ངམ་ཨང་སྒྲིག་

དཔེ་གཞི་


Sub ExampleWorkWithAFile
Dim iNumber As Integer
Dim sLine As String
Dim aFile As String
Dim sMsg As String
    aFile = "c:\data.txt"
    iNumber = Freefile
    Open aFile For Output As #iNumber
    Print #iNumber, "First line of text"
    Print #iNumber, "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

Please support us!