Warning message in Printf

Hello colleagues,
I am using Julia v 0.7. When I print a value x, and give the commands:

using Printf
x = 2.0
@printf(“The value of x = %2.1f\n”,x)
Appers a warning message in this version (not in 0.6.4):

WARNING: Base.@printf is deprecated: it has been moved to the standard library package Printf.
Add using Printf to your imports.

How can I eliminate this message in my program?

^

2 Likes

You have probably already called @printf in the same session, before the using Printf, so the deprecated version from Base has already been bound to the name @printf. If you run your code in a fresh Julia session you won’t see the warning.

Thank you so much! Solved!