diff --git a/base/docs/helpdb/Base.jl b/base/docs/helpdb/Base.jl index 3a669992c71f3..b7748cff42198 100644 --- a/base/docs/helpdb/Base.jl +++ b/base/docs/helpdb/Base.jl @@ -2912,21 +2912,6 @@ Squared absolute value of `x`. """ abs2 -""" - write(stream::IO, x) - write(filename::AbstractString, x) - -Write the canonical binary representation of a value to the given I/O stream or file. -Returns the number of bytes written into the stream. - -You can write multiple values with the same :func:`write` call. i.e. the following are -equivalent: - - write(stream, x, y...) - write(stream, x) + write(stream, y...) -""" -write - """ sizehint!(s, n) diff --git a/base/io.jl b/base/io.jl index 29aa202314678..9d65ae5e5e1d4 100644 --- a/base/io.jl +++ b/base/io.jl @@ -23,6 +23,20 @@ function iswritable end function copy end function eof end +""" + write(stream::IO, x) + write(filename::AbstractString, x) + +Write the canonical binary representation of a value to the given I/O stream or file. +Returns the number of bytes written into the stream. + +You can write multiple values with the same `write` call. i.e. the following are equivalent: + + write(stream, x, y...) + write(stream, x) + write(stream, y...) +""" +function write end + read(s::IO, ::Type{UInt8}) = error(typeof(s)," does not support byte I/O") write(s::IO, x::UInt8) = error(typeof(s)," does not support byte I/O") diff --git a/base/operators.jl b/base/operators.jl index 31faf73b1d77f..be5ccf5c5354f 100644 --- a/base/operators.jl +++ b/base/operators.jl @@ -230,7 +230,7 @@ end Unsigned right bit shift operator, `x >>> n`. For `n >= 0`, the result is `x` shifted right by `n` bits, where `n >= 0`, filling with `0`s. For `n < 0`, this -is equivalent to `x [<<](:func:`<<`) -n`]. +is equivalent to `x << -n`. For `Unsigned` integer types, this is equivalent to [`>>`](:func:`>>`). For `Signed` integer types, this is equivalent to `signed(unsigned(x) >> n)`. diff --git a/doc/stdlib/io-network.rst b/doc/stdlib/io-network.rst index 4e747354dda2a..67a1b123c57b6 100644 --- a/doc/stdlib/io-network.rst +++ b/doc/stdlib/io-network.rst @@ -134,7 +134,7 @@ General I/O Write the canonical binary representation of a value to the given I/O stream or file. Returns the number of bytes written into the stream. - You can write multiple values with the same :func:``write`` call. i.e. the following are equivalent: + You can write multiple values with the same ``write`` call. i.e. the following are equivalent: .. code-block:: julia diff --git a/doc/stdlib/math.rst b/doc/stdlib/math.rst index cf4a4ad72312d..206f9e38733f7 100644 --- a/doc/stdlib/math.rst +++ b/doc/stdlib/math.rst @@ -284,7 +284,7 @@ Mathematical Operators .. Docstring generated from Julia source - Unsigned right bit shift operator, ``x >>> n``\ . For ``n >= 0``\ , the result is ``x`` shifted right by ``n`` bits, where ``n >= 0``\ , filling with ``0``\ s. For ``n < 0``\ , this is equivalent to ``x [<<](:func:``\ <<``) -n``\ ]. + Unsigned right bit shift operator, ``x >>> n``\ . For ``n >= 0``\ , the result is ``x`` shifted right by ``n`` bits, where ``n >= 0``\ , filling with ``0``\ s. For ``n < 0``\ , this is equivalent to ``x << -n``\ . For ``Unsigned`` integer types, this is equivalent to :func:`>>`\ . For ``Signed`` integer types, this is equivalent to ``signed(unsigned(x) >> n)``\ .