LibreOffice 25.2 Help
Calls a subroutine that is indicated by a label inside a Sub or a Function. The statements following the label are executed until the next Return statement. Afterwards, the program continues with the statement that follows the GoSub statement.
GoSub label[:]
label: A line identifier indicating where to continue execution. The scope of a label in that of the routine it belongs to.
The GoSub statement calls a local subroutine indicated by a label from within a subroutine or a function. The name of the label must end with a colon (":").
Sub/Function foo
' statements
GoSub label
' statements
Exit Sub/Function
label:
' statements
Return
End Sub/Function
Pirogiraame GoSub roorannokki qolote fooliishsho iillitusiro, LibreOffice Basic so'ro sokka qolanno. Pirogiraame Cinaancho woy Assishsha albisufi Qolote foolishsho iillitara albaasse agurannota buuxate Cinaancho Gudi woy Assishsha Gudi horonsi'ri.
Konni woroonni noo lawishshi GoSub nna Qoli horo leellishanno. Pirogoraamete kifile lameegge loosatenni, pirogiraame horonsi'raanchunni e'ino lame kiiro goodesaame rumushsho shallagganno.
Sub ExampleGoSub
Dim iInputa As Single
Dim iInputb As Single
Dim iInputc As Single
iInputa = Int(EoteSaaxine$ "Umi kiiro eessi: ","KiiroteEo"))
iInputb = Int(EoteSaaxine$ "Layinkki kiiro eessi: ","KiiroteEo"))
iInputc=iInputa
GoSub SquareRoot
"..ha godeessaame rumushsho";iInputa;" ";iInputc attami
iInputc=iInputb
GoSub SquareRoot
Attami "Godeessaame rumushsho";iInputb;" is";iInputc
Exit Sub
SquareRoot:
iInputc=sqr(iInputc)
Return
End Sub