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

e.g.

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

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.

1 Like

In fact, the docs for Julia 1.0 has

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

which works just fine. Which is not surprising, as the docs are tested with jldoctest.

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

1 Like

I am using the latest JuliaDocumentation.pdf.

the search function seem changed to:

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

julia>

Where is this being distributed?

https://juliacomputing.com/docs/

but according to: 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>

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

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

1 Like