Contents
Index 🔎︎

# Input# Statement

Tartiiba faayilii irraa deetaa dubbisa.

## caasimaa:

Input #FileNumber As Integer; var1[, var2[, var3[,...]]]

## Ulaagaalee:

FileNumber: Baay'ina faayilii kan deetaa dubbisuu barbaadde of keessaa qabu. Faayiliin hima banaa irraa banamuu qaba jefuraa INPUT jedhamu fayyadamuudhaan.

var: Gegeedaramaa numeerikaalaa ykn diraa kan gatii faayilii banaa irraa dubbifamu.

Himni Input# gatii numeerikaalaa ykn diraa faayilii banaa irraa deetaa gegeedaramaa tokkoo fi isaa olitti mogaafama. Gegeedaramaan numeerikaalaa hanga daangaa toorbarruu (Asc=13) (Asc=10),iddoo,qoodduu dubbisa. Gegeedaraman diraa hanga toorbarruu(Asc=13), (Asc=10), ykn qoodduutti dubbisa.

Deetaa fi akaakuu deetaa faayilii banaa keessaa tartiiba tokkoon akka ulaagaa gegeedaramaa "var" mul'achuu qaba.Yoo gatii numeerikaala hin taane gegeedaramaa numeerikaalaati moggaaste "var" gatii "0" moggaafama.

Kuusaan qooddudhaan addan bahan gegeedaramaa diraatti hin moggafaman. Mallattoo waraabbii("") hubannoo keessaa galuu qaba.Yoo faayiliirraa arfii kana dubbisuu barbaadde sarara kana fayyadami hima Input# barruu qulqulluu sarara sararaan dubbisuuf (faayiliin arfii maxxanfamaa qofa of keessaa qaba).

Yoo dhumni faayilii dhaqabame ennaa maalimni deetaa dubbifamu dogogorrii uumamee hojiin addaan kuta.

## Fakkeenya:

    Sub ExampleWorkWithAFile
    Dim iCount As Integer
    Dim sName As String
    Dim sValue As Integer
    Dim sFileName As String

    sFileName = "c:\data.txt"
    iCount = Freefile

    ' Write data ( which we will read later with Input ) to file
    Open sFileName For Output As iCount
    sName = "Hamburg"
    sValue = 200
    Write #iCount, sName, sValue
    sName = "New York"
    sValue = 300
    Write #iCount, sName, sValue
    sName = "Miami"
    sValue = 459
    Write #iCount, sName, sValue
    Close #iCount

    iCount = Freefile
    ' Read data file using Input
    Open sFileName For Input As iCount
    Input #iCount; sName, sValue
    MsgBox sName & " " & sValue
    Input #iCount; sName, sValue
    MsgBox sName & " " & sValue
    Input #iCount; sName, sValue
    MsgBox sName & " " & sValue
    Close #iCount
    End Sub