# LoadError: UndefVarError: Printf not defined

**URL:** <https://discourse.julialang.org/t/loaderror-undefvarerror-printf-not-defined/67482>\
**Category:** General Usage\
**Tags:** question\
**Created:** [September 1, 2021, 8:30am UTC](https://discourse.julialang.org/t/loaderror-undefvarerror-printf-not-defined/67482 "2021-09-01T08:30:40Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![JonasIsensee](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jonasisensee/32/4704_2.png) [@JonasIsensee](https://discourse.julialang.org/u/JonasIsensee)\
**Post date:** [September 1, 2021, 8:35am UTC](https://discourse.julialang.org/t/loaderror-undefvarerror-printf-not-defined/67482/2 "2021-09-01T08:35:27Z")

</div>

Hi @GoH,

julia tries to evaluate your `begin ... end` block in a single go.  
Macros are some of the first things that are expanded.  
However, the macro `@printf` is only defined when calling `using Printf`.  
So, this can not work.

Try splitting the package loading into a separate blocks / cells.

---

_[View the full topic](https://discourse.julialang.org/t/loaderror-undefvarerror-printf-not-defined/67482)._
