# @ in function declartion

**URL:** <https://discourse.julialang.org/t/in-function-declartion/36418>\
**Category:** New to Julia\
**Created:** [March 24, 2020, 5:42am UTC](https://discourse.julialang.org/t/in-function-declartion/36418 "2020-03-24T05:42:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![donkeysaddle](https://avatars.discourse-cdn.com/v4/letter/d/3e96dc/32.png) [@donkeysaddle](https://discourse.julialang.org/u/donkeysaddle)\
**Post date:** [March 24, 2020, 5:42am UTC](https://discourse.julialang.org/t/in-function-declartion/36418/1 "2020-03-24T05:42:33Z")

</div>

Hi, I am currently going through the DifferentialEquations documentation and am trying to run an [example](https://docs.juliadiffeq.org/v1.6/analysis/parameter_estimation.html). Unfortunately, I am failing to achieve liftoff:

```julia
f = @ode_def_nohes LotkaVolterraTest begin
  dx = a*x - b*x*y
  dy = -c*y + d*x*y
end a=>1.5 b=1.0 c=3.0 d=1.0

u0 = [1.0;1.0]
tspan = (0.0,10.0)
prob = ODEProblem(f,u0,tspan)

```

Gives:

`UndefVarError: @ode_def_nohes not defined`

I don’t really understand this type of function declaration, so I am not sure how to tweak it appropriately (besides just rewriting the DE in the “standard” way).

Any explanations would be greatly appreciated.

Thanks,

DS

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [March 24, 2020, 6:53am UTC](https://discourse.julialang.org/t/in-function-declartion/36418/2 "2020-03-24T06:53:59Z")

</div>

Generally, `@` denotes a [macro](https://docs.julialang.org/en/v1/manual/metaprogramming/#man-macros-1). However, if you are new to Julia, I would suggest leaving metaprogramming for later, and just focusing on this specific macro. I think that the `@ode_def` macros are defined in

[https://github.com/JuliaDiffEq/ParameterizedFunctions.jl](https://github.com/JuliaDiffEq/ParameterizedFunctions.jl)

but note that the new recommended approach is

[https://github.com/JuliaDiffEq/ModelingToolkit.jl](https://github.com/JuliaDiffEq/ModelingToolkit.jl)

I imagine that docs are in the process of being updated.

---

<div class="post-metadata">

**Author:** ![donkeysaddle](https://avatars.discourse-cdn.com/v4/letter/d/3e96dc/32.png) [@donkeysaddle](https://discourse.julialang.org/u/donkeysaddle)\
**Post date:** [March 24, 2020, 5:27pm UTC](https://discourse.julialang.org/t/in-function-declartion/36418/3 "2020-03-24T17:27:37Z")

</div>

Thanks, Tamas\_Papp. Hopefully this will clear things up for me.

Appreciate it,

DS
