fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.
Fuzion
•
Idioms
•
Idiom # 358 Format a value in unit notation
Idiom # 358 Format a value in unit notation
See
programming-idioms.org
:
Code
Code input
s := a = 1 ? "$a $x" : "$a {x}s"
What are effects?
Runnable Example
Code input
ex358 is x := "file" for a in [0, 1, 1000] do # NYI: formatting of numbers with grouped thousand not yet implemented s := a = 1 ? "$a $x" : "$a {x}s" say s
What are effects?
last changed: 2025-07-10
next: Idiom # 359 Euclidean division