Skip to content

Commit

Permalink
Fix docs for isdefined
Browse files Browse the repository at this point in the history
  • Loading branch information
simonster committed Sep 3, 2016
1 parent 7126d89 commit bf1b993
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
11 changes: 8 additions & 3 deletions base/docs/helpdb/Base.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1675,12 +1675,17 @@ eta
"""
isdefined([m::Module,] s::Symbol)
isdefined(object, s::Symbol)
isdefined(a::AbstractArray, index::Int)
isdefined(object, index::Int)
isdefined(a::Array, index::Int)
Tests whether an assignable location is defined. The arguments can be a module and a symbol,
a composite object and field name (as a symbol), or an array and index. With a single
symbol argument, tests whether a global variable with that name is defined in
a composite object and field name (as a symbol) or index, or an Array and index.
With a single symbol argument, tests whether a global variable with that name is defined in
`current_module()`.
Note: For AbstractArrays other than Array, `isdefined` tests whether the given field index
is defined, not the given array index. To test whether an array index is defined, use
[`isassigned`](:func:`isassigned`).
"""
isdefined

Expand Down
7 changes: 5 additions & 2 deletions doc/stdlib/base.rst
Original file line number Diff line number Diff line change
Expand Up @@ -349,11 +349,14 @@ All Objects

.. function:: isdefined([m::Module,] s::Symbol)
isdefined(object, s::Symbol)
isdefined(a::AbstractArray, index::Int)
isdefined(object, index::Int)
isdefined(a::Array, index::Int)

.. Docstring generated from Julia source
Tests whether an assignable location is defined. The arguments can be a module and a symbol, a composite object and field name (as a symbol), or an array and index. With a single symbol argument, tests whether a global variable with that name is defined in ``current_module()``\ .
Tests whether an assignable location is defined. The arguments can be a module and a symbol, a composite object and field name (as a symbol) or index, or an Array and index. With a single symbol argument, tests whether a global variable with that name is defined in ``current_module()``\ .

Note: For AbstractArrays other than Array, ``isdefined`` tests whether the given field index is defined, not the given array index. To test whether an array index is defined, use :func:`isassigned`\ .

.. function:: convert(T, x)

Expand Down

0 comments on commit bf1b993

Please sign in to comment.