When running Julia 1.0.0 the @printf macro seems to not be able to accept either a constant format string or a variable format string. This is shown below.
julia> using Printf
julia> const fmt = "%10d %6.4f"
"%10d %6.4f"
julia> @printf(fmt, 101, 65.4039)
ERROR: LoadError: ArgumentError: @printf: first or second argument must be a format string
julia> fmt2 = "%10d %6.4f"
"%10d %6.4f"
julia> @printf(fmt2, 101, 65.4039)
ERROR: LoadError: ArgumentError: @printf: first or second argument must be a format string
I found a discussion for an early version of Julia (2013) where this kind of thing was not allowed.
I see in the 1.0.0 documentation for @printf the following syntax:
@printf([io::IOStream], "%Fmt", args...)
Does this imply that "@Fmt" must be hardcoded into the @printf parameters when called?
Has anything changed with regard to using a dynamic format string since 2013 with regard to Julia's @printf?