# Get values of symbols inside a function

**URL:** <https://discourse.julialang.org/t/get-values-of-symbols-inside-a-function/848>\
**Category:** General Usage\
**Created:** [December 10, 2016, 4:26pm UTC](https://discourse.julialang.org/t/get-values-of-symbols-inside-a-function/848 "2016-12-10T16:26:35Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Ronis\_BR](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ronis_br/32/50999_2.png) [@Ronis\_BR](https://discourse.julialang.org/u/Ronis_BR)\
**Post date:** [December 10, 2016, 4:26pm UTC](https://discourse.julialang.org/t/get-values-of-symbols-inside-a-function/848/1 "2016-12-10T16:26:35Z")

</div>

Hi guys! I have one problem: if I have an array of symbols, how can I get their values inside a function scope?

Something like this:

```julia
function f(a::Array{Symbols,1})
    a = 1
    b = 2
    c = 3

    # Get the values of the symbols in `a` and return.
end

f([:a,:b])

```

Then it should return `[1;2]`. I know that `eval` will not work because it operates at global scope. So, is there any way to do this?

Thanks,  
Ronan

---

_[View the full topic](https://discourse.julialang.org/t/get-values-of-symbols-inside-a-function/848)._
