Skip to content

Commit

Permalink
Added notes function example
Browse files Browse the repository at this point in the history
Added notes function example under Composite Types showing how to return a list of field names
  • Loading branch information
EconometricsBySimulation committed Apr 22, 2014
1 parent ececf77 commit f227736
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions doc/manual/types.rst
Expand Up @@ -353,6 +353,15 @@ this implied type signature:
julia> Foo((), 23.5, 1)
ERROR: no method Foo((), Float64, Int64)

You may find a list of field names using the ``names`` function.

.. doctest::
julia> names(foo)
3-element Array{Any,1}:
:bar
:baz
:qux

You can access the field values of a composite object using the
traditional ``foo.bar`` notation:

Expand Down

0 comments on commit f227736

Please sign in to comment.