It should give the same results.
But it gives me error.
However I think if it works it can be powerful because we can define anything using string concatenation like ^ * etc.
Could anyone give some hints, is it possible to do things like above?
Thank you very much. Sorry I was a little sleepy and asked a stupid question again.
I see, the great thing of Printf.Format is that it allows me to put string() inside, like,
s = Printf.Format(string("%f"^4,"%f"^4))
So can define anything.
May I ask, how to use or is it possible to use Printf.format to write the contents in a txt file, say AA.txt?
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.