Skip to content

Commit

Permalink
add documention in IOContext docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
rfourquet committed Nov 21, 2017
1 parent 1900286 commit 3aa10c9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 3 additions & 2 deletions base/arrayshow.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
# The array printing methods here can be grouped into two categories (and are annotated as such):
# 1) "typeinfo aware" : these are "API boundaries" functions, which will read the typeinfo
# property from the context, and pass down to their value an updated property
# according to its eltype;
# 2) "typeinfo agnostic": this are helper functions used by the first category; hence
# according to its eltype; at each layer of nesting, only one "typeinfo aware"
# function must be called;
# 2) "typeinfo agnostic": these are helper functions used by the first category; hence
# they don't manipulate the typeinfo property, and let the printing routines
# for their elements read directly the property set by their callers
#
Expand Down
5 changes: 5 additions & 0 deletions base/show.jl
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ The following properties are in common use:
- `:displaysize`: A `Tuple{Int,Int}` giving the size in rows and columns to use for text
output. This can be used to override the display size for called functions, but to
get the size of the screen use the `displaysize` function.
- `:typeinfo`: a type specification characterizing the information already expressed
concerning the type of the object about to be displayed. This is mainly useful when
displaying a collection of object of the same type, so that redundant type information
can be avoided (e.g. `[[Int16(0)]]` can be shown as "Array{Int16,1}[[0]]" instead
of "Array{Int16,1}[Int16[0]]"
```jldoctest
julia> function f(io::IO)
Expand Down

0 comments on commit 3aa10c9

Please sign in to comment.