Contents
Index 🔎︎

# GoSub...Return Statement

sagantaa xiqqaa kan asxaan agarsiifame sagantaa xiqqaa ykn faankishiniini irraa waami. Himoonni asxatti aanan kan raawwatu hanga himni itti aanu deebi'utti. Isaan booda,sagantaan hima hima GoSub aanu waliin itti fufa.

## caasimaa:

    Ulaagaalee ilaali

## Ulaagaalee:

Sub/Function

garee himaa

Moggaasa

garee himaa

GoSub Label

Exit Sub/Function

Asxaa:

garee himaa

deebisi

End Sub/Function

HimniGoSub sagantaa xiqqoo qe'e asxaan sagantaa xiqqoo ykn faankishiniinin agarsiifame waama. Maqaan asxaa tuq-lameen(":")dhan dhumuu qaba.

Yoo sagantaan hima deebii of keessaatti qabu GoSubdurfamuu baate, LibreOffice Basic ergaa dogongoraa deebisa. sagantaan Sub ykn Function dhiisuu dhugoomsuuf osoo hima Return bira hinga'inExit Sub ykn Exit Function fayyadami.

Fakkeenyi armaan gadii faayidaa GoSub and Return mul'isa.Kutaa sagantaa al-lama raawwachuun,sagantaan iskuweer ruuttii lakkofsota lamaa kan fayyadamaan itti gale shallaga.

## Fakkeenya:

    Sub ExampleGoSub
    Dim iInputa As Single
    Dim iInputb As Single
    Dim iInputc As Single
        iInputa = Int(InputBox("Enter the first number: ","NumberInput"))
        iInputb = Int(InputBox("Enter the second number: ","NumberInput"))
        iInputc=iInputa
        GoSub SquareRoot
        Print "The square root of";iInputa;" is";iInputc
        iInputc=iInputb
        GoSub SquareRoot
        Print "The square root of";iInputb;" is";iInputc
        Exit Sub
    SquareRoot:
        iInputc=sqr(iInputc)
        Return
    End Sub