fometaPaloPhegelwana
Turns a number into text with commas marking thousands.
A comma is the "," mark — it goes in after every three digits from the right, so that a long number is easy to read.
fometaPaloPhegelwana(12345)is "12,345"fometaPaloPhegelwana(1234567)is "1,234,567"fometaPaloPhegelwana(12345.67, 1)is "12,345.6"fometaPaloPhegelwana(12345, 2)is "12,345.00"
The first difference from fometaPalo: where only one extra number is given, here it counts digits after the point, not before it.
The second difference, which is worth knowing: fometaPaloPhegelwana does not round — it cuts the extra digits. 12345.67 with 1 is "12,345.6", not "12,345.7". And zeros are only added when the number has no fractional part at all: fometaPaloPhegelwana(12345.67, 3) stays "12,345.67". When you want rounding and padding every time, use fometaPalo.
Given a list, it returns a list of strings.
Syntax
Section titled “Syntax”fometaPaloPhegelwana(boleng, kwaMorago)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
boleng | palo | The number to format. A list of numbers is also accepted. |
kwaMorago (optional) | palo | How many digits to keep after the point. |
Examples
Section titled “Examples”tiro setaLoeto() {
thalaKanefase(400, 400);
bokamorago(220);
tlogelaMothalo();
diri palo = 1234567;
kwala(palo);
kwala(fometaPaloPhegelwana(palo));
kwala(fometaPaloPhegelwana(12345.678, 2));
tlatsaMmala(200, 140, 0);
kgolokwe(200, 200, 240);
}