Contents
Index 🔎︎

# For...Next Statement

Himoota giduu garee For...Next yeroo ifteefameef irra deddeebi'i.

## caasimaa:

    For counter=start To end [Step step]
    garee himaa
    [Exit For]
    garee himaa
    Next [counter]

## Jijjiiramoota:

Lakkaa'aa: Marsaa lakkaa'aan gatii jalqabarratti gara harka mirgaa mallattoo walqixaa kaa'a. Lakkofsa jijjiramtootaa qofatu sirriidha. Marsaa lakkaa'aan ni dabala ykn ni hir'ata akkaataa jijjiiramaa Step hanga End'n darbutti.

Jalqaba: Lakkoofsi jijjiiramaan gatii jalqabaa ka'uumsa marsaa irratt kan ibsuu dha.

End:Lakkoofsi jijjiiramaan gatii xumuraa marsaa dhumaa irratti kan ibsuu dha.

Step:Gatii akkataa dabaluu ykn hir'isuu lakkaa'aa marsaa qindeessi. Yoo Step'n hin ibsamne,lakkaa'aan marsa 1'n dabala.kan keessatti, End'n irra guddaa Start ta'uu qaba. Yoo lakkaa'aa hir'isuu barbaadde,End'n irra xiqqaa Start ta'uu,fi Step,n gatii nagatiivii qabaachuu qaba.

marsaan For...Next himoota hundaa marsaa keessaa yeroo ta'eef irra deddeebi'a ulaagaalee ibsamaniin.

Akkuma lakka'aa jijjiiramaan hir'ateen,LibreOffice Basic gatiin dhumaa qaqabuu isaa mirkaneessa.Akkuma lakkaa'aan gatii dhumaa dabarseen,marsaan ofumaan dhuma.

Hima For...Nextwal keessa seensisuun ni danda'ama.Yoo jijjiiramaa hima Next aanutti ibsuu baatte,Nextofumaan himaForyeroo baay'ee dhihoo ta'e barbaada.

Yoo daballii 0 ibsite,himoonni gidduu For and Next itti fufuun irra deddeebi'u.

yommuu lakkaa'aa jijjiiramaan gad laakkaa'u,LibreOffice Basic ol yaa'insa ykn gad yaa'insa mirkaneessa.yommuu lakkaa'aan End(gatii Step poozatiivii)caale ykn End(gatii Step nagatiivii)xiqqaate marsaan ni xumurama.

Hma Exit For fayyadami osoo hin beekin marsaa keessaa bahuuf.Himni kun dirqama marsaa For...Next keessa ta'u qaba.Hima If...Then fayyadami haala bahiinsa mirkaneessuuf akka asii gadiitti.

For...

himoota

If condition = True Then Exit For

himoota

Kan itti aanu

hub:Qooda marsaaFor...Next ,yoo osoo hin beekin marsaa Exit Forwajjin keessaa baate,marsaa tokkoo qofaatu baha.

## Fakkeenya

Fakkeenyi armaan gadii diraa waraantoo miseensota 10 qabu tartiiban kaa'uuf marsaa walkeessa galan lama fayyadama.sun jalqaba baafata baay'een guutama.

    Sub ExampleSort
    Dim sEntry(9) As String
    Dim iCount As Integer
    Dim iCount2 As Integer
    Dim sTemp As String
        sEntry(0) = "Jerry"
        sEntry(1) = "Patty"
        sEntry(2) = "Kurt"
        sEntry(3) = "Thomas"
        sEntry(4) = "Michael"
        sEntry(5) = "David"
        sEntry(6) = "Cathy"
        sEntry(7) = "Susie"
        sEntry(8) = "Edward"
        sEntry(9) = "Christine"
        For iCount = 0 To 9
            For iCount2 = iCount + 1 To 9
                If sEntry(iCount) > sEntry(iCount2) Then
                    sTemp = sEntry(iCount)
                    sEntry(iCount) = sEntry(iCount2)
                    sEntry(iCount2) = sTemp
                End If
            Next iCount2
        Next iCount
        For iCount = 0 To 9
            Print sEntry(iCount)
        Next iCount
    End Sub