# Identify function arguments that have been used

**URL:** <https://discourse.julialang.org/t/identify-function-arguments-that-have-been-used/27885>\
**Category:** New to Julia\
**Created:** [August 23, 2019, 10:32am UTC](https://discourse.julialang.org/t/identify-function-arguments-that-have-been-used/27885 "2019-08-23T10:32:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ceysa75](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ceysa75/32/19121_2.png) [@ceysa75](https://discourse.julialang.org/u/ceysa75)\
**Post date:** [August 23, 2019, 10:32am UTC](https://discourse.julialang.org/t/identify-function-arguments-that-have-been-used/27885/1 "2019-08-23T10:32:29Z")

</div>

Hi all,

a simple question. Say I have a function as follows:

```julia
function f(a,b)
    return (a+b)
end

```

How can i find out, which values actually have been used as arguments? In the given example, I would like to find out (after the function has been called) which values have been considered for a and b.

Thanks

---

<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:** [August 23, 2019, 10:41am UTC](https://discourse.julialang.org/t/identify-function-arguments-that-have-been-used/27885/2 "2019-08-23T10:41:43Z")

</div>

I don’t think you can do this in general very easily. You could inspect the compiled form, but the compiler may perform optimizations (eg fold constants) which would provide misleading information.

If there is some context to the question (what you actually want to achieve), please share it, it may be possible to do something else.

---

<div class="post-metadata">

**Author:** ![ceysa75](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ceysa75/32/19121_2.png) [@ceysa75](https://discourse.julialang.org/u/ceysa75)\
**Post date:** [August 23, 2019, 11:08am UTC](https://discourse.julialang.org/t/identify-function-arguments-that-have-been-used/27885/3 "2019-08-23T11:08:45Z")

</div>

Ok. Good to know, and thank you for the fast response.

There is nothing special about it. I just wanted to use this info for double-checking the arguments at the end (especially for the case when working with optional arguments).

Thank you
