# Many examples included in the docs don't work in Julia 1.0

**URL:** <https://discourse.julialang.org/t/many-examples-included-in-the-docs-dont-work-in-julia-1-0/14410>\
**Category:** General Usage\
**Created:** [September 1, 2018, 4:13pm UTC](https://discourse.julialang.org/t/many-examples-included-in-the-docs-dont-work-in-julia-1-0/14410 "2018-09-01T16:13:01Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![justwawre](https://avatars.discourse-cdn.com/v4/letter/j/e19adc/32.png) [@justwawre](https://discourse.julialang.org/u/justwawre)\
**Post date:** [September 1, 2018, 4:13pm UTC](https://discourse.julialang.org/t/many-examples-included-in-the-docs-dont-work-in-julia-1-0/14410/1 "2018-09-01T16:13:01Z")

</div>

e.g.

```julia
julia> search("xylophone", 'p')
ERROR: UndefVarError: search not defined
Stacktrace:
 [1] top-level scope at none:0

```

---

<div class="post-metadata">

**Author:** ![Sukera](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Sukera](https://discourse.julialang.org/u/Sukera)\
**Post date:** [September 1, 2018, 4:26pm UTC](https://discourse.julialang.org/t/many-examples-included-in-the-docs-dont-work-in-julia-1-0/14410/2 "2018-09-01T16:26:23Z")

</div>

Where in the docs did you find this? Which version of the docs? As far as I can tell, they are up to date with the examples for the right version.

---

<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:** [September 1, 2018, 4:46pm UTC](https://discourse.julialang.org/t/many-examples-included-in-the-docs-dont-work-in-julia-1-0/14410/3 "2018-09-01T16:46:46Z")

</div>

In fact, the [docs for Julia 1.0](https://docs.julialang.org/en/stable/manual/strings/#Common-Operations-1) has

```julia
julia> findfirst(isequal('p'), "xylophone")
5

```

which works just fine. Which is not surprising, as the docs are [tested with `jldoctest`](https://docs.julialang.org/en/stable/manual/documentation/#Documentation-1).

---

<div class="post-metadata">

**Author:** ![cormullion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cormullion/32/49131_2.png) [@cormullion](https://discourse.julialang.org/u/cormullion)\
**Post date:** [September 1, 2018, 5:55pm UTC](https://discourse.julialang.org/t/many-examples-included-in-the-docs-dont-work-in-julia-1-0/14410/4 "2018-09-01T17:55:51Z")

</div>

I think you’re using the docs for Julia v0.6. Much has happened since then.

---

<div class="post-metadata">

**Author:** ![justwawre](https://avatars.discourse-cdn.com/v4/letter/j/e19adc/32.png) [@justwawre](https://discourse.julialang.org/u/justwawre)\
**Post date:** [September 2, 2018, 12:23am UTC](https://discourse.julialang.org/t/many-examples-included-in-the-docs-dont-work-in-julia-1-0/14410/5 "2018-09-02T00:23:27Z")

</div>

I am using the latest JuliaDocumentation.pdf.

the search function seem changed to:

julia\> occursin(“o”, “Xylophon”)  
true

julia\>

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [September 2, 2018, 12:26am UTC](https://discourse.julialang.org/t/many-examples-included-in-the-docs-dont-work-in-julia-1-0/14410/6 "2018-09-02T00:26:01Z")

</div>

> [@justwawre](#):
>
> I am using the latest JuliaDocumentation.pdf.

Where is this being distributed?

---

<div class="post-metadata">

**Author:** ![justwawre](https://avatars.discourse-cdn.com/v4/letter/j/e19adc/32.png) [@justwawre](https://discourse.julialang.org/u/justwawre)\
**Post date:** [September 2, 2018, 12:59am UTC](https://discourse.julialang.org/t/many-examples-included-in-the-docs-dont-work-in-julia-1-0/14410/7 "2018-09-02T00:59:53Z")

</div>

> [@fredrikekre](#):
>
> JuliaDocumentation.pdf.

[https://juliacomputing.com/docs/](https://juliacomputing.com/docs/)

but according to: [Parallel Computing · The Julia Language](https://docs.julialang.org/en/v1/manual/parallel-computing/)

below example don’t work too.

julia\> @schedule make\_jobs(n); # feed the jobs channel with “n” jobs  
ERROR: LoadError: UndefVarError: @schedule not defined  
in expression starting at REPL[26]:1

julia\>

---

<div class="post-metadata">

**Author:** ![favba](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/favba/32/2735_2.png) [@favba](https://discourse.julialang.org/u/favba)\
**Post date:** [September 2, 2018, 1:05am UTC](https://discourse.julialang.org/t/many-examples-included-in-the-docs-dont-work-in-julia-1-0/14410/8 "2018-09-02T01:05:02Z")

</div>

The documentation you linked is for JuliaPro, which is not using julia 1.0 yet, but v0.6.4.

---

<div class="post-metadata">

**Author:** ![LeoK987](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/leok987/32/4880_2.png) [@LeoK987](https://discourse.julialang.org/u/LeoK987)\
**Post date:** [September 2, 2018, 4:32am UTC](https://discourse.julialang.org/t/many-examples-included-in-the-docs-dont-work-in-julia-1-0/14410/9 "2018-09-02T04:32:00Z")

</div>

Always use the doc that comes with your julia installation. For instance, if you installed julia-1.0.0 under folder /home/user/Julia/, then the documentation is:  
/home/user/Julia/julia-1.0.0/share/doc/julia/html/en/index.html
