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


julia> search("xylophone", 'p')
ERROR: UndefVarError: search not defined
 [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")

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”)


Where is this being distributed?

but according to:

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


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:

1 Like