mokwalo
Converts a number or a
nnete/maakavalue into text.
mokwalo(123) is "123" — a number you could count with is now text you can join to other text with +.
Note: converting nnete or maaka gives the text "true" or "false" in English. It is JavaScript itself that writes that value out, not Bopa — so do not expect "nnete" in the resulting text.
Given a list, it returns a list of strings.
Syntax
Section titled “Syntax”mokwalo(boleng)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
boleng | sengwe | A number, text, or nnete/maaka. A list of those is also accepted. |
Examples
Section titled “Examples”tiro setaLoeto() {
thalaKanefase(400, 400);
bokamorago(220);
tlogelaMothalo();
diri bogolo = 150;
diri boleng = mokwalo(bogolo) + " diphikisele";
kwala(boleng);
tlatsaMmala(140, 60, 180);
kgolokwe(200, 200, bogolo);
}tiro setaLoeto() {
thalaKanefase(400, 400);
bokamorago(220);
tlogelaMothalo();
diri boleng = mokwalo(nnete);
kwala(boleng);
kwala(boleng === "true");
tlatsaMmala(0, 170, 120);
thalaKhutlonne(80, 150, 240, 100);
}