# Optional or named arguments

**URL:** <https://discourse.julialang.org/t/optional-or-named-arguments/69968>\
**Category:** New to Julia\
**Created:** [October 18, 2021, 11:57am UTC](https://discourse.julialang.org/t/optional-or-named-arguments/69968 "2021-10-18T11:57:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![whatsthecraic](https://avatars.discourse-cdn.com/v4/letter/w/7bcc69/32.png) [@whatsthecraic](https://discourse.julialang.org/u/whatsthecraic)\
**Post date:** [October 18, 2021, 11:57am UTC](https://discourse.julialang.org/t/optional-or-named-arguments/69968/1 "2021-10-18T11:57:12Z")

</div>

base/show.jl defines at line 2218 at least in v1.6 the function `function show_tuple_as_call(io::IO, name::Symbol, sig::Type, demangle=false, kwargs=nothing, argnames=nothing, qualified=false)`

I’m able to invoke it `Base.show_tuple_as_call(stdout, timings.mi_info.mi.def.name, timings.mi_info.mi.specTypes)` but not at `Base.show_tuple_as_call(stdout, timings.mi_info.mi.def.name, timings.mi_info.mi.specTypes; demangle = true)`. What is the correct syntax to set named arguments?

---

<div class="post-metadata">

**Author:** ![gustaphe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gustaphe/32/18174_2.png) [@gustaphe](https://discourse.julialang.org/u/gustaphe)\
**Post date:** [October 18, 2021, 12:29pm UTC](https://discourse.julialang.org/t/optional-or-named-arguments/69968/2 "2021-10-18T12:29:12Z")

</div>

Those are not keyword arguments but optional positional arguments. If you want a keyword argument, you need `function f(x; keyword="default")` in the definition (note the semicolon).
