# Include\_string third argument fname

**URL:** <https://discourse.julialang.org/t/include-string-third-argument-fname/5590>\
**Category:** General Usage\
**Created:** [August 27, 2017, 2:10pm UTC](https://discourse.julialang.org/t/include-string-third-argument-fname/5590 "2017-08-27T14:10:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bdurin](https://avatars.discourse-cdn.com/v4/letter/b/fbc32d/32.png) [@bdurin](https://discourse.julialang.org/u/bdurin)\
**Post date:** [August 27, 2017, 2:10pm UTC](https://discourse.julialang.org/t/include-string-third-argument-fname/5590/1 "2017-08-27T14:10:12Z")

</div>

Hi,

What is the meaning / use of the third argument fname in include\_string?  
I saw it used this way in IJulia:

```julia
include_string(Main, code, "In[$n]")

```

where n is a number (say 1), In is a mapping of Int to String, which stores code string. So if n=1, In[1] contains code.  
I tried the following in the REPL

```julia
include_string(Main, "a=1; a+a", "s")

```

which works at intended, but I do not get the purpose of the third argument.

Thanks,  
Bruno

---

<div class="post-metadata">

**Author:** ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)\
**Post date:** [August 27, 2017, 2:22pm UTC](https://discourse.julialang.org/t/include-string-third-argument-fname/5590/2 "2017-08-27T14:22:56Z")

</div>

```julia
julia> Base.include_string("0//0", "HEEEEEEEEEERE")
ERROR: LoadError: ArgumentError: invalid rational: zero(Int64)//zero(Int64)
Stacktrace:
 [1] Rational{Int64}(::Int64, ::Int64) at ./rational.jl:13
 [2] //(::Int64, ::Int64) at ./rational.jl:40
 [3] include_string(::String, ::String) at ./loading.jl:515
while loading HEEEEEEEEEERE, in expression starting on line 1

```

and `fname` = filename.

---

<div class="post-metadata">

**Author:** ![bdurin](https://avatars.discourse-cdn.com/v4/letter/b/fbc32d/32.png) [@bdurin](https://discourse.julialang.org/u/bdurin)\
**Post date:** [August 27, 2017, 2:34pm UTC](https://discourse.julialang.org/t/include-string-third-argument-fname/5590/3 "2017-08-27T14:34:39Z")

</div>

So it seems that fname argument only serves as an identifier of the code string when an exception is raised.  
Thank you!
