While format strings are a powerful DSL, I would stop short of including conditionals and control flow and use Julia instead. That is, if you need to construct a format string on the fly, just encapsulate the logic in a function that branches to the appropriate @printf "%f" value or @printf "%F" value.
2 Likes