Skip to content

Commit

Permalink
Merge pull request #21660 from musm/patch-1
Browse files Browse the repository at this point in the history
Use where syntax in types.md for show method
  • Loading branch information
Sacha0 authored May 2, 2017
2 parents 63c269e + 91ec5bd commit b6e4e70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/src/manual/types.md
Original file line number Diff line number Diff line change
Expand Up @@ -1198,7 +1198,7 @@ format for displaying an object by overloading a three-argument form of `show` t
`text/plain` MIME type as its second argument (see [Multimedia I/O](@ref)), for example:

```jldoctest polartype
julia> Base.show{T}(io::IO, ::MIME"text/plain", z::Polar{T}) =
julia> Base.show(io::IO, ::MIME"text/plain", z::Polar{T}) where{T} =
print(io, "Polar{$T} complex number:\n ", z)
```

Expand All @@ -1225,7 +1225,7 @@ Moreover, you can also define `show` methods for other MIME types in order to en
we can define formatted HTML display of `Polar` objects, with superscripts and italics, via:

```jldoctest polartype
julia> Base.show{T}(io::IO, ::MIME"text/html", z::Polar{T}) =
julia> Base.show(io::IO, ::MIME"text/html", z::Polar{T}) where {T} =
println(io, "<code>Polar{$T}</code> complex number: ",
z.r, " <i>e</i><sup>", z.Θ, " <i>i</i></sup>")
```
Expand Down

0 comments on commit b6e4e70

Please sign in to comment.