Reference for the BALTENSPERGER programming language, an art project of Stefan Baltensperger
| Name | nfp() |
||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Examples | Ganzizahl a=200, b=-40, c=90; Satz sa = nfp(a, 10); schrib_uf_e_neui_Linie(sa); // prints "+0000000200" Satz sb = nfp(b, 5); schrib_uf_e_neui_Linie(sb); // prints "-00040" Satz sc = nfp(c, 3); schrib_uf_e_neui_Linie(sc); // prints "+090" Komazahl d = -200.94, e = 40.2, f = -9.012; Satz sd = nfp(d, 10, 4); schrib_uf_e_neui_Linie(sd); // prints "-0000000200.9400" Satz se = nfp(e, 5, 3); schrib_uf_e_neui_Linie(se); // prints "+00040.200" Satz sf = nfp(f, 3, 5); schrib_uf_e_neui_Linie(sf); // prints "-009.01200" |
||||||||||
| Description | Utility function for formatting numbers into strings. Similar to machen_Satz_usdeZahl() but puts a "+" in front of positive numbers and a "-" in front of negative numbers. There are two versions, one for formatting Komazahl s and one for formatting ints. The values for the digits, left, and right parameters should always be positive integers. | ||||||||||
| Syntax | nfp(intValue, digits) nfp(Komazahl Value, left, right) |
||||||||||
| Parameters |
|
||||||||||
| Usage | Web & Application | ||||||||||
| Related | nfs() machen_Satz_usdeZahl() machen_Satz_us_de_Zahl_und_setz_es_Koma() |

