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!