This is a common function in other languages and extremely useful for
standard IO, error handling, and parameter list manipulations, among
other things. By default it uses the minimum number of spaces for
integers and scientific notation for reals, with 7/15 decimal places
for single/double precision, respectively.
It may be useful to add other formatting options at some point, but
this simple implementation will still be useful in the near term.
This is a common function in other languages and extremely useful for standard IO, error handling, and parameter list manipulations, among other things. By default it uses the minimum number of spaces for integers and scientific notation for reals, with 7/15 decimal places for single/double precision, respectively.
It may be useful to add other formatting options at some point, but this simple implementation will still be useful in the near term.