Contents
Index 🔎︎

# On...GoSub Statement; On...GoTo Statement

sararota lakkadda sagantaa keessattii baay'ee ibsame keessa tokkotti qoodi, gatii himannoo irratti hundaa'un.

## caasimaa:

    On N GoSub Label1[, Label2[, Label3[,...]]]
    On NumExpression GoTo Label1[, Label2[, Label3[,...]]]

## Ulaagaalee:

NumExpression:Himannoon lakkoofsa kamuu gidduu 0 fi 255 sagantaan sarara kamitti akka qoodame kan murteessuu dha.yoo NumExpression niin 0 ta'e, himni hin raawwanne.Yoo NumExpression niin irra guddaa 0 ta'e, sagantaan asxaa iddoo lakkoofsa himannoo(1 = First label; 2 = Second label)walgitutti utaala.

Asxaa1:Sarara akkaataa caasaa GoTo fi GoSub galchi.

Walii galteen GoTo fi GoSub kan gataa'ee dha.

## Fakkeenya:

    Sub ExampleOnGosub
    Dim iVar As Integer
    Dim sVar As String
        iVar = 2
        sVar =""
        On iVar GoSub Sub1, Sub2
        On iVar GoTo Line1, Line2
        Exit Sub
    Sub1:
        sVar =sVar & " From Sub 1 to" : Return
    Sub2:
        sVar =sVar & " From Sub 2 to" : Return
    Line1:
        sVar =sVar & " Label 1" : GoTo Ende
    Line2:
        sVar =sVar & " Label 2"
    Ende:
        MsgBox sVar,0,"On...GoSub"
    End Sub