Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reference all the numbers #22107

Merged
merged 24 commits into from
May 29, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions base/Enums.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ julia> f(apple)
"I'm a Fruit with value: 1"
```

`BaseType`, which defaults to `Int32`, must be a primitive subtype of Integer. Member values can be converted between
the enum type and `BaseType`. `read` and `write` perform these conversions automatically.
`BaseType`, which defaults to [`Int32`](@ref), must be a primitive subtype of `Integer`.
Member values can be converted between the enum type and `BaseType`. `read` and `write`
perform these conversions automatically.
"""
macro enum(T,syms...)
if isempty(syms)
Expand Down
2 changes: 1 addition & 1 deletion base/abstractarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ julia> similar(trues(10,10), 2)
false
```

Since `BitArray`s can only store elements of type `Bool`, however, if you request a
Since `BitArray`s can only store elements of type [`Bool`](@ref), however, if you request a
different element type it will create a regular `Array` instead:

```julia-repl
Expand Down
4 changes: 2 additions & 2 deletions base/array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ end
eye([T::Type=Float64,] m::Integer, n::Integer)

`m`-by-`n` identity matrix.
The default element type is `Float64`.
The default element type is [`Float64`](@ref).
"""
function eye(::Type{T}, m::Integer, n::Integer) where T
a = zeros(T,m,n)
Expand All @@ -287,7 +287,7 @@ eye(::Type{T}, n::Integer) where {T} = eye(T, n, n)
eye([T::Type=Float64,] n::Integer)

`n`-by-`n` identity matrix.
The default element type is `Float64`.
The default element type is [`Float64`](@ref).
"""
eye(n::Integer) = eye(Float64, n)

Expand Down
2 changes: 1 addition & 1 deletion base/c.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Culong
"""
Cwchar_t

Equivalent to the native `wchar_t` c-type (`Int32`).
Equivalent to the native `wchar_t` c-type ([`Int32`](@ref)).
"""
Cwchar_t

Expand Down
22 changes: 11 additions & 11 deletions base/ctypes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,39 @@
"""
Cuchar

Equivalent to the native `unsigned char` c-type (`UInt8`).
Equivalent to the native `unsigned char` c-type ([`UInt8`](@ref)).
"""
const Cuchar = UInt8


"""
Cshort

Equivalent to the native `signed short` c-type (`Int16`).
Equivalent to the native `signed short` c-type ([`Int16`](@ref)).
"""
const Cshort = Int16


"""
Cushort

Equivalent to the native `unsigned short` c-type (`UInt16`).
Equivalent to the native `unsigned short` c-type ([`UInt16`](@ref)).
"""
const Cushort = UInt16


"""
Cint

Equivalent to the native `signed int` c-type (`Int32`).
Equivalent to the native `signed int` c-type ([`Int32`](@ref)).
"""
const Cint = Int32


"""
Cuint

Equivalent to the native `unsigned int` c-type (`UInt32`).
Equivalent to the native `unsigned int` c-type ([`UInt32`](@ref)).
"""
const Cuint = UInt32

Expand Down Expand Up @@ -70,46 +70,46 @@ const Cssize_t = Int
"""
Cintmax_t

Equivalent to the native `intmax_t` c-type (`Int64`).
Equivalent to the native `intmax_t` c-type ([`Int64`](@ref)).
"""
const Cintmax_t = Int64


"""
Cuintmax_t

Equivalent to the native `uintmax_t` c-type (`UInt64`).
Equivalent to the native `uintmax_t` c-type ([`UInt64`](@ref)).
"""
const Cuintmax_t = UInt64


"""
Clonglong

Equivalent to the native `signed long long` c-type (`Int64`).
Equivalent to the native `signed long long` c-type ([`Int64`](@ref)).
"""
const Clonglong = Int64


"""
Culonglong

Equivalent to the native `unsigned long long` c-type (`UInt64`).
Equivalent to the native `unsigned long long` c-type ([`UInt64`](@ref)).
"""
const Culonglong = UInt64


"""
Cfloat

Equivalent to the native `float` c-type (`Float32`).
Equivalent to the native `float` c-type ([`Float32`](@ref)).
"""
const Cfloat = Float32


"""
Cdouble

Equivalent to the native `double` c-type (`Float64`).
Equivalent to the native `double` c-type ([`Float64`](@ref)).
"""
const Cdouble = Float64
17 changes: 9 additions & 8 deletions base/dates/accessors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ for func in (:year, :month)
@doc """
$($name)(dt::TimeType) -> Int64

The $($name) of a `Date` or `DateTime` as an `Int64`.
The $($name) of a `Date` or `DateTime` as an [`Int64`](@ref).
""" $func(dt::TimeType)
end
end
Expand All @@ -83,9 +83,10 @@ end
week(dt::TimeType) -> Int64

Return the [ISO week date](https://en.wikipedia.org/wiki/ISO_week_date) of a `Date` or
`DateTime` as an `Int64`. Note that the first week of a year is the week that contains the
first Thursday of the year which can result in dates prior to January 4th being in the last
week of the previous year. For example `week(Date(2005,1,1))` is the 53rd week of 2004.
`DateTime` as an [`Int64`](@ref). Note that the first week of a year is the week that
contains the first Thursday of the year which can result in dates prior to January 4th
being in the last week of the previous year. For example `week(Date(2005,1,1))` is the 53rd
week of 2004.
"""
week(dt::TimeType)

Expand All @@ -95,15 +96,15 @@ for func in (:day, :dayofmonth)
@doc """
$($name)(dt::TimeType) -> Int64

The day of month of a `Date` or `DateTime` as an `Int64`.
The day of month of a `Date` or `DateTime` as an [`Int64`](@ref).
""" $func(dt::TimeType)
end
end

"""
hour(dt::DateTime) -> Int64

The hour of day of a `DateTime` as an `Int64`.
The hour of day of a `DateTime` as an [`Int64`](@ref).
"""
hour(dt::DateTime)

Expand All @@ -113,7 +114,7 @@ for func in (:minute, :second, :millisecond)
@doc """
$($name)(dt::DateTime) -> Int64

The $($name) of a `DateTime` as an `Int64`.
The $($name) of a `DateTime` as an [`Int64`](@ref).
""" $func(dt::DateTime)
end
end
Expand All @@ -137,7 +138,7 @@ for func in (:hour, :minute, :second, :millisecond, :microsecond, :nanosecond)
@doc """
$($name)(t::Time) -> Int64

The $($name) of a `Time` as an `Int64`.
The $($name) of a `Time` as an [`Int64`](@ref).
""" $func(t::Time)
end
end
8 changes: 4 additions & 4 deletions base/dates/adjusters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,8 @@ tonext(dt::TimeType, dow::Int; same::Bool=false) = adjust(ISDAYOFWEEK[dow], same
tonext(func::Function, dt::TimeType; step=Day(1), limit=10000, same=false) -> TimeType

Adjusts `dt` by iterating at most `limit` iterations by `step` increments until `func`
returns `true`. `func` must take a single `TimeType` argument and return a `Bool`. `same`
allows `dt` to be considered in satisfying `func`.
returns `true`. `func` must take a single `TimeType` argument and return a [`Bool`](@ref).
`same` allows `dt` to be considered in satisfying `func`.
"""
function tonext(func::Function, dt::TimeType; step::Period=Day(1), negate=nothing, limit::Int=10000, same::Bool=false)
func = deprecate_negate(:tonext, func, "func,dt", negate)
Expand All @@ -274,8 +274,8 @@ toprev(dt::TimeType, dow::Int; same::Bool=false) = adjust(ISDAYOFWEEK[dow], same
toprev(func::Function, dt::TimeType; step=Day(-1), limit=10000, same=false) -> TimeType

Adjusts `dt` by iterating at most `limit` iterations by `step` increments until `func`
returns `true`. `func` must take a single `TimeType` argument and return a `Bool`. `same`
allows `dt` to be considered in satisfying `func`.
returns `true`. `func` must take a single `TimeType` argument and return a [`Bool`](@ref).
`same` allows `dt` to be considered in satisfying `func`.
"""
function toprev(func::Function, dt::TimeType; step::Period=Day(-1), negate=nothing, limit::Int=10000, same::Bool=false)
func = deprecate_negate(:toprev, func, "func,dt", negate)
Expand Down
4 changes: 2 additions & 2 deletions base/dates/conversions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ end
datetime2unix(dt::DateTime) -> Float64

Takes the given `DateTime` and returns the number of seconds
since the unix epoch `1970-01-01T00:00:00` as a `Float64`.
since the unix epoch `1970-01-01T00:00:00` as a [`Float64`](@ref).
"""
datetime2unix(dt::DateTime) = (value(dt) - UNIXEPOCH) / 1000.0

Expand Down Expand Up @@ -116,6 +116,6 @@ end
datetime2julian(dt::DateTime) -> Float64

Takes the given `DateTime` and returns the number of Julian calendar days since the julian
epoch `-4713-11-24T12:00:00` as a `Float64`.
epoch `-4713-11-24T12:00:00` as a [`Float64`](@ref).
"""
datetime2julian(dt::DateTime) = (value(dt) - JULIANEPOCH) / 86400000.0
2 changes: 1 addition & 1 deletion base/dates/periods.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ for period in (:Year, :Month, :Week, :Day, :Hour, :Minute, :Second, :Millisecond
$($period_str)(v)

Construct a `$($period_str)` object with the given `v` value. Input must be
losslessly convertible to an `Int64`.
losslessly convertible to an [`Int64`](@ref).
""" $period(v)
end
end
Expand Down
2 changes: 1 addition & 1 deletion base/dates/query.jl
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ dayofyear(y, m, d) = MONTHDAYS[m] + d + (m > 2 && isleapyear(y))
"""
dayofweek(dt::TimeType) -> Int64

Returns the day of the week as an `Int64` with `1 = Monday, 2 = Tuesday, etc.`.
Returns the day of the week as an [`Int64`](@ref) with `1 = Monday, 2 = Tuesday, etc.`.
"""
dayofweek(dt::TimeType) = dayofweek(days(dt))

Expand Down
4 changes: 2 additions & 2 deletions base/dates/rounding.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ epochms2datetime(i) = DateTime(UTM(DATETIMEEPOCH + Int64(i)))
date2epochdays(dt::Date) -> Int64

Takes the given `Date` and returns the number of days since the rounding epoch
(`0000-01-01T00:00:00`) as an `Int64`.
(`0000-01-01T00:00:00`) as an [`Int64`](@ref).
"""
date2epochdays(dt::Date) = value(dt) - DATEEPOCH

"""
datetime2epochms(dt::DateTime) -> Int64

Takes the given `DateTime` and returns the number of milliseconds since the rounding epoch
(`0000-01-01T00:00:00`) as an `Int64`.
(`0000-01-01T00:00:00`) as an [`Int64`](@ref).
"""
datetime2epochms(dt::DateTime) = value(dt) - DATETIMEEPOCH

Expand Down
8 changes: 4 additions & 4 deletions base/dates/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ end
Nanosecond(v)

Construct a `Period` type with the given `v` value. Input must be losslessly convertible
to an `Int64`.
to an [`Int64`](@ref).
"""
Period(v)

Expand Down Expand Up @@ -173,7 +173,7 @@ argerror() = Nullable{ArgumentError}()
"""
DateTime(y, [m, d, h, mi, s, ms]) -> DateTime

Construct a `DateTime` type by parts. Arguments must be convertible to `Int64`.
Construct a `DateTime` type by parts. Arguments must be convertible to [`Int64`](@ref).
"""
function DateTime(y::Int64, m::Int64=1, d::Int64=1,
h::Int64=0, mi::Int64=0, s::Int64=0, ms::Int64=0)
Expand All @@ -197,7 +197,7 @@ end
"""
Date(y, [m, d]) -> Date

Construct a `Date` type by parts. Arguments must be convertible to `Int64`.
Construct a `Date` type by parts. Arguments must be convertible to [`Int64`](@ref).
"""
function Date(y::Int64, m::Int64=1, d::Int64=1)
err = validargs(Date, y, m, d)
Expand All @@ -214,7 +214,7 @@ end
"""
Time(h, [mi, s, ms, us, ns]) -> Time

Construct a `Time` type by parts. Arguments must be convertible to `Int64`.
Construct a `Time` type by parts. Arguments must be convertible to [`Int64`](@ref).
"""
function Time(h::Int64, mi::Int64=0, s::Int64=0, ms::Int64=0, us::Int64=0, ns::Int64=0)
err = validargs(Time, h, mi, s, ms, us, ns)
Expand Down
4 changes: 2 additions & 2 deletions base/docs/basedocs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Julia’s type system more than just a collection of object implementations. For
abstract type Number end
abstract type Real <: Number end

`Number` has no supertype, whereas `Real` is an abstract subtype of `Number`.
[`Number`](@ref) has no supertype, whereas [`Real`](@ref) is an abstract subtype of `Number`.
"""
kw"abstract type"

Expand Down Expand Up @@ -124,7 +124,7 @@ primitive type declarations:

The number after the name indicates how many bits of storage the type requires. Currently,
only sizes that are multiples of 8 bits are supported.
The `Bool` declaration shows how a primitive type can be optionally
The [`Bool`](@ref) declaration shows how a primitive type can be optionally
declared to be a subtype of some supertype.
"""
kw"primitive type"
Expand Down
Loading