01 · First program
Print a line of text with the language's runtime output function.
First program .kwe
bipụta("Ndewo Ụwa!") Output: Ndewo Ụwa!
Executable learning material
The sources below come directly from the repository's examples directory. Expected output was verified against the current compiler and runtime.
01 · First program
Print a line of text with the language's runtime output function.
bipụta("Ndewo Ụwa!") 02 · Functions
Declare a function, return a value, and call it from the top level.
ọrụ gbakọọ(a, b) {
laghachi a + b
}
nsonaazụ = gbakọọ(10, 20)
bipụta(nsonaazụ) 03 · Conditions
Use a strict Boolean condition and a flow-aware branch variable.
afọ = 36
ọ bụrụ (afọ >= 18) {
ọkwa = "Okenye"
} ọzọ {
ọkwa = "Nwatakịrị"
}
bipụta(ọkwa) 04 · Collections
Work with a homogeneous array and a typed object.
ahaNdị = ["Uche", "Ada", "Obi"]
mmadụ = { aha: ahaNdị[0], afọ: 36 }
bipụta(ahaNdị)
bipụta(mmadụ)
bipụta(mmadụ.aha) 05 · Modules
Import named values from a relative Kwechiri module.
webata { gbakọọ, pi } site na "./mgbakọ.kwe"
bipụta(gbakọọ(pi, 2))