Skip to content

Commit

Permalink
compat notice for a[begin] indexing (#55197)
Browse files Browse the repository at this point in the history
`a[begin]` indexing was added by #35779 in Julia 1.6, so this feature
needs a compat notice in the docstring.
  • Loading branch information
stevengj authored Jul 21, 2024
1 parent 680c7e3 commit 43df7fb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion base/docs/basedocs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1386,7 +1386,11 @@ Usually `begin` will not be necessary, since keywords such as [`function`](@ref)
implicitly begin blocks of code. See also [`;`](@ref).
`begin` may also be used when indexing to represent the first index of a
collection or the first index of a dimension of an array.
collection or the first index of a dimension of an array. For example,
`a[begin]` is the first element of an array `a`.
!!! compat "Julia 1.6"
Use of `begin` as an index requires Julia 1.6 or later.
# Examples
```jldoctest
Expand Down

0 comments on commit 43df7fb

Please sign in to comment.