Aantuwanna assishshuwa horonsi'ranni

Module
Contents
Index 🔎︎

# Aanyuwanna Assishshuwa horonsi'ranni

Konni woroonni noohu LibreOffice Basic giddo qara aantuwatenna assishshuwate horo xawisanno.

When you create a new module, LibreOffice Basic automatically inserts a SUB called "Main". This default name has nothing to do with the order or the starting point of a LibreOffice Basic project. You can also safely rename this SUB.

Gama qoqqorshshuwa publike soorramaanor su'mira, cinaanchuwate, nna assishshuwate loosansantanno. addaaricho pirogiraamete mini mojulla gede addaaricho su'ma horonsi'dhooti.

Aantuwanna (SUBS) nna assishshuwa (FUNCTIONS) pirogiraame korkaataanchu kifilenni badatenni loosamino illachiisha haaruunsate kaa'lanno.

Aantuwatenna assishshuwate horo, taske ganaasine amaddanno pirogiraamete koode loossittoro, tenne koode wole pirojekte giddo horonsi'ra dandaatto.

## Soorramaano aantuwatenna (CINAANCHO) nna Assishshuwa (ASSISHSHA) sayisanni

Soorramaano aantuwatenna assishshuwate wido sa'a dandiitanno. CINAANCHO woy ASSISHSHA eishshuwa abbate xawisama hasiissannose:

    Sub SubName(Parameter1 As Type, Parameter2 As Type,...)

    Pirogiraamete koode

    End Sub

CINAANCHO konni woroonni noo ganallo horonsi'ratenni dagganno.

    SubName(Value1, Value2,...)

The parameters passed to a SUB must fit to those specified in the SUB declaration.

Addaaricho ha'rinsho ASSISHSHUWAte losansantanno. Qoleno, assishshuwa barru tuqa assishshu guma qoltanno. Assishshu gumi qolote hornyo assishshu su'mira gaamatenni tiramanno:

    Function FunctionName(Parameter1 As Type, Parameter2 As Type,...) As Type

    Pirogiraamete koode

    AssishshuSu'ma=Guma

    End Function

ASSISHSHA konni woroonni noo ganallo horonsi'ratenni daanno:

    Soorramaancho=AssishshuSu'ma(Eishsha1, Eishsha2,...)

Aante woy assishsha abbate owaatamino su'ma horonsi'ra dandaatto:
Pirogiraamete mine.Mojule.Maakiro()
Lawishshaho, Gimmiksete mini giddonni umikkinniborreessi maakiro abbate, konni woroonni noo hajajo horonsi'ri:
Gimmicks.UmikkinniBorressi.Qara()

## Soorramaano Hornyotenniinna Maqishshunni Sayisanni

Eishshuwa CINAANCHO woy ASSISHSHAte wido maqishshunni woy hornyotenni sa'a dandiitanno. Badama hoogguro, eishshu barru baal maqishshunni sa'anno. Kunino yaa CINAANCHO woy ASSISHSHA eishsha adhite hornyose nabbawanna soorra dandiitanno.

CINAANCHO woy ASSISHSHA abbatto yannara eishsha hornyotenni sayisa hasirittoro eishshaho albaanni "ByVal" qaraqaale surki, lawishshaho:

    Result = Function(ByVal Parameter)

Konni garinni, eishshunniti umi amado hornyo ikkiinniina eishsha adhitannokki daafo ASSISHSHA nni disoorrantanno.

## Soorramaanote bikka

CINAANCHO woy ASSISHSHA giddo tiramino soorramaanchi, addimmo ikke keeshshannohu aante fultanno geeshshaati. Kunino "Baadi" soorramaancho yaamamanno. Baalante aantuwa giddo, baalante pirogiraamete mini mittu mittunku mojule giddo, woy CINAANCHO woy ASSISHSHA fultu gedensaanni soorramaanchu addimmo ikka hasiisannosi.

### Soorramaano CINAANCHO woy ASSISHSHA gobbaanni xawisanni

    Kalqe VarSU'ma TYPENAME Gede

LibreOffice qurxi-yanna gooffa geeshsha soorramaanchu addimmo ikkanno.

    Public VarName TYPENAME Gede

Soorramaanchu baalante mojulla giddo addimmo ikkanno.

    Private VarName TYPENAME Gede

Soorramaanchu mojulete giddo calla addimmo ikkanno.

    Public VarName TYPENAME Gede

Soorramaanchu mojulete giddo calla addimmo ikkanno.

### Private soorramaanora lawishsha

CompatibilityMode(halaale) qineessatenni private soorramaano mojullate widoonni private ikkitanno gede giddeessi.

    ' ***** Module1 *****

    Private myText As String

    Sub initMyText

        aneBorro = "Hello"

        "Mojulete giddo1 : ", aneBorro attami

    End Sub

    ' ***** Module2 *****

    'Option Explicit

    Sub demoBug

        CompatibilityMode( true )

        initMyText

        ' xaa mullicho naannifikiima qolanno

        ' (woy doorote so'ro lossanno)

        "Xa 2 mojule giddo: ", aneBorro attami

    End Sub

### CINAANCHO woy ASSISHSHA fulitto gedensaanni Soorramaanchu Amado soorranno

    Soorramannokki VarSu'ma TYPENAME Gede

ASSISHSHA woy CINAANCHO eanno geeshsha soorramaanchu hornyosi gatisanno. Xawishshu CINAANCHO woy ASSISHSHA giddo heera hasiisannosi.

## ASSISHSHA nniha qolote Hornyo Dana badanni

Soorramaanotenni, assishshu su'mi gedensaanni danu-xawishsha fikiima woy "Gede"nni leellino assishsha hattono qolote hornyo tirate eishshu dirto gumulora muli qulfe qaale amaddanno, lawishshaho:

    Function WordCount(WordText As String) As Integer