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.

(cherry picked from commit 43df7fb)
  • Loading branch information
stevengj authored and KristofferC committed Jul 24, 2024
1 parent 9ca08e9 commit 21d33b4
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 @@ -1335,7 +1335,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 21d33b4

Please sign in to comment.