# Warning: Assignment Variable

**URL:** <https://discourse.julialang.org/t/warning-assignment-variable/73784>\
**Category:** New to Julia\
**Tags:** question\
**Created:** [December 29, 2021, 8:01pm UTC](https://discourse.julialang.org/t/warning-assignment-variable/73784 "2021-12-29T20:01:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![stanfordblaze](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stanfordblaze/32/32287_2.png) [@stanfordblaze](https://discourse.julialang.org/u/stanfordblaze)\
**Post date:** [December 29, 2021, 8:01pm UTC](https://discourse.julialang.org/t/warning-assignment-variable/73784/1 "2021-12-29T20:01:46Z")

</div>

Can someone explain me what the warning means? If anyone has tips for preventing this error then it would be awesome.

Code:

```julia
user_input = "Sam is mad!"

while user_input != "END"

    print("Enter some input, or END to quit: ")

    user_input = readline() #prompt the user input

end

```

error code:

```julia
┌ Warning: Assignment to `user_input` in soft scope is ambiguous because a global variable by the same name exists: `user_input` will be treated as a new local. Disambiguate by using `local user_input` to suppress this warning or `global user_input` to assign to the existing global variable.

└ @ *:\+++++++++++(Privacy)\While loops.jl:5

```

---

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [December 29, 2021, 8:04pm UTC](https://discourse.julialang.org/t/warning-assignment-variable/73784/2 "2021-12-29T20:04:51Z")

</div>

[https://m3g.github.io/JuliaNotes.jl/stable/loopscopes/](https://m3g.github.io/JuliaNotes.jl/stable/loopscopes/)
