# Understanding \`@eval\` help string and expressions

**URL:** <https://discourse.julialang.org/t/understanding-eval-help-string-and-expressions/72510>\
**Category:** General Usage\
**Created:** [December 3, 2021, 9:38am UTC](https://discourse.julialang.org/t/understanding-eval-help-string-and-expressions/72510 "2021-12-03T09:38:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![danielw2904](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/danielw2904/32/10890_2.png) [@danielw2904](https://discourse.julialang.org/u/danielw2904)\
**Post date:** [December 3, 2021, 9:38am UTC](https://discourse.julialang.org/t/understanding-eval-help-string-and-expressions/72510/1 "2021-12-03T09:38:01Z")

</div>

I came across this implementing the rotational cipher in exercism with the very nice help of @tomerarnon. The help for `@eval` states:

> @eval [mod,] ex  
> Evaluate an expression with values interpolated into it using eval. […]

Not knowing what an expression is I looked into the Julia docs [for expressions and evaluation](https://docs.julialang.org/en/v1/manual/metaprogramming/#Expressions-and-evaluation) where my interpretation is that an expression has the form

```julia
quote
    CODE
end

```

However, `@eval` evaluates

```julia
@eval CODE

```

rather than

```julia
@eval quote
    CODE
end

```

To give an example

```julia
name = "pln"
@eval quote
    function $(Symbol(name))(txt)
        println(txt)
    end
end

```

returns a quoted version which can be passed to `eval` to evaluate

```julia
name = "pln"
@eval function $(Symbol(name))(txt)
        println(txt)
    end

```

creates the function `pln` as expected.  
I am not fully clear on what the type of `CODE` is. Is that also an expression even though it is not quoted?
