Lof Function

αžαŸ’αžšαž‘αž”αŸ‹β€‹αž‘αŸ†αž αŸ†β€‹αž“αŸƒβ€‹αž―αž€αžŸαžΆαžšβ€‹αžŠαŸ‚αž›β€‹αž”αžΎαž€ αž‚αž·αžβ€‹αž‡αžΆβ€‹αž”αŸƒΒ αŸ”

αžœαžΆαž€αŸ’αž™β€‹αžŸαž˜αŸ’αž–αž“αŸ’αž’ αŸ–


Lof (FileNumber)

αžαž˜αŸ’αž›αŸƒβ€‹αžαŸ’αžšαž‘αž”αŸ‹ αŸ–

Long

αž”αŸ‰αžΆαžšαŸ‰αžΆαž˜αŸ‰αŸ‚αžαŸ’αžš αŸ–

αž…αŸ†αž“αž½αž“β€‹αž―αž€αžŸαžΆαžšβ€‹ αŸ– αž€αž“αŸ’αžŸαŸ„αž˜β€‹αž›αŸαžβ€‹αžŽαžΆβ€‹αž˜αž½αž™ αžŠαŸ‚αž›β€‹αž˜αžΆαž“β€‹αž›αŸαžβ€‹αž―αž€αžŸαžΆαžšβ€‹αžŠαŸ‚αž›β€‹αžαŸ’αžšαžΌαžœβ€‹αž”αžΆαž“β€‹αž”αž‰αŸ’αž‡αžΆαž€αŸ‹β€‹β€‹αž€αŸ’αž“αž»αž„β€‹αžŸαŸαž…αž€αŸ’αžαžΈβ€‹αžαŸ’αž›αŸ‚αž„β€‹αž€αžΆαžšαžŽαŸ OpenΒ αŸ”

αžšαžΌαž”β€‹αžαŸ†αžŽαžΆαž„β€‹αž–αŸαžαŸŒαž˜αžΆαž“β€‹αž‡αŸ†αž“αž½αž™

αžŠαžΎαž˜αŸ’αž”αžΈβ€‹αž‘αž‘αž½αž›β€‹αž”αžΆαž“β€‹αž”αŸ’αžšαžœαŸ‚αž„β€‹αž“αŸƒβ€‹αž―αž€αžŸαžΆαžšβ€‹αžŠαŸ‚αž›β€‹αž˜αž·αž“β€‹αž”αžΎαž€ αž”αŸ’αžšαžΎβ€‹αž’αž“αž»αž‚αž˜αž“αŸ FileLenΒ αŸ”


Error codes:

5 αž€αžΆαžšβ€‹αž αŸ…β€‹αž”αŸ‚αž”αž”αž‘β€‹αž˜αž·αž“β€‹αžαŸ’αžšαžΉαž˜αžαŸ’αžšαžΌαžœ

52 αžˆαŸ’αž˜αŸ„αŸ‡ αž¬β€‹αž›αŸαžβ€‹αž―αž€αžŸαžΆαžšβ€‹αž˜αž·αž“β€‹αžαŸ’αžšαžΉαž˜αžαŸ’αžšαžΌαžœ

αž§αž‘αžΆαž αžšαžŽαŸ αŸ–


Sub ExampleRandomAccess
Dim iNumber As Integer
Dim sText As Variant REM must be a Variant
Dim aFile As String
    aFile = "c:\data.txt"
    iNumber = Freefile
    Open aFile For Random As #iNumber Len=32
    Seek #iNumber,1 REM Position at start
    Put #iNumber,, "This is the first line of text" REM Fill line with text
    Put #iNumber,, "This is the second line of text"
    Put #iNumber,, "This is the third line of text"
    Seek #iNumber,2
    Get #iNumber,,sText
    Print sText
    Close #iNumber
    iNumber = Freefile
    Open aFile For Random As #iNumber Len=32
    Get #iNumber,2,sText
    Put #iNumber,,"This is a new line of text"
    Get #iNumber,1,sText
    Get #iNumber,2,sText
    Put #iNumber,20,"This is the text in record 20"
    Print Lof(#iNumber)
    Close #iNumber
End Sub

Please support us!