Module
Contents
Index 🔎︎

# Lof Function

Hamamtaa faayilii banaa baayitiin deebisa.

## caasimaa:

    Lof (FileNumber)

## Gatii deebii:

Dheeraa

## Ulaagaalee:

FileNumber: Himannoo numeerikaalaa kan baay'ina faayilii of keessaa qabu innis hima banaadhaan ibsama.

Dheerina faayilii hin banamnee argachuuuf,faankishinii kana FileLen fayyadami.

## Error codes:

5 Ejjatoo fashalaan waamu

52 Maqaa faayiylii yookiin lakkoofsa yaraa

## Fakkeenya:

    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

        Barbaachaa #iNumber,1 REM Qubannoo duraaratti

        Put #iNumber,, "Kun barruu sarara tokkoffaati" REM Barruudhaan guuta

        Put #iNumber,, "Kun sarara barruu isa lammaffa dha"

        Put #iNumber,, "Kun sarara barruu isa sadaffaadha"

        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,,"Kun barruu sarara haaraa ti"

        Get #iNumber,1,sText

        Get #iNumber,2,sText

        Put #iNumber,20,"Kun barruu kuusaa 20 keessati"

        Print Lof(#iNumber)

        Close #iNumber

    End Sub