# Top-Level Scope?

**URL:** <https://discourse.julialang.org/t/top-level-scope/14961>\
**Category:** New to Julia\
**Created:** [September 14, 2018, 2:58pm UTC](https://discourse.julialang.org/t/top-level-scope/14961 "2018-09-14T14:58:39Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phillip\_Sutton](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/phillip_sutton/32/7603_2.png) [@Phillip\_Sutton](https://discourse.julialang.org/u/Phillip_Sutton)\
**Post date:** [September 14, 2018, 2:58pm UTC](https://discourse.julialang.org/t/top-level-scope/14961/1 "2018-09-14T14:58:39Z")

</div>

Can someone explain “top-level scope” to me? I am forever running into top-level scope at none:0 errors and cant seem to troubleshoot them.

Thanks!

---

<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 14, 2018, 3:36pm UTC](https://discourse.julialang.org/t/top-level-scope/14961/2 "2018-09-14T15:36:12Z")

</div>

Hi!  
Would you please provide a simple example?

You can include code by wrapping it in backticks ` `  
`x = 1+1`

---

<div class="post-metadata">

**Author:** ![Phillip\_Sutton](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/phillip_sutton/32/7603_2.png) [@Phillip\_Sutton](https://discourse.julialang.org/u/Phillip_Sutton)\
**Post date:** [September 17, 2018, 3:56pm UTC](https://discourse.julialang.org/t/top-level-scope/14961/3 "2018-09-17T15:56:14Z")

</div>

`julia\> mean([1,2,3,4])  
ERROR: UndefVarError: mean not defined  
Stacktrace:  
[1] top-level scope at none:0’

---

<div class="post-metadata">

**Author:** ![mbauman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbauman/32/31082_2.png) [@mbauman](https://discourse.julialang.org/u/mbauman)\
**Post date:** [September 17, 2018, 3:56pm UTC](https://discourse.julialang.org/t/top-level-scope/14961/4 "2018-09-17T15:56:45Z")

</div>

You need a `using Statistics` now in 1.0

---

<div class="post-metadata">

**Author:** ![Phillip\_Sutton](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/phillip_sutton/32/7603_2.png) [@Phillip\_Sutton](https://discourse.julialang.org/u/Phillip_Sutton)\
**Post date:** [September 17, 2018, 3:59pm UTC](https://discourse.julialang.org/t/top-level-scope/14961/5 "2018-09-17T15:59:33Z")

</div>

Is there a list in the documentation that lets us know all the things we took for granted before and the Base packages we should be loading now?

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [September 17, 2018, 4:08pm UTC](https://discourse.julialang.org/t/top-level-scope/14961/6 "2018-09-17T16:08:30Z")

</div>

0.7 has deprecation warnings in place.

---

<div class="post-metadata">

**Author:** ![Sukera](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Sukera](https://discourse.julialang.org/u/Sukera)\
**Post date:** [September 17, 2018, 5:04pm UTC](https://discourse.julialang.org/t/top-level-scope/14961/7 "2018-09-17T17:04:06Z")

</div>

> [@PSA: use Julia 0.7 if you are upgrading](https://discourse.julialang.org/t/psa-use-julia-0-7-if-you-are-upgrading/13321):
>
> A lot of people are posting issues where their old code doesn’t work anymore on 1.0 because some function has been renamed or removed. The 0.7 release exists exactly for this reason: your old code will work on 0.7 and give you a specific warning about how to fix your code. If you have any old code, you should use 0.7 to get these warnings before switching to 1.0; even if you just have work habits that may need changing, you should probably use 0.7 for a while. If someone posts an issue like thi…
