From 93e086f52b013de065816658539925076771a1ea Mon Sep 17 00:00:00 2001 From: "Steven G. Johnson" Date: Sun, 21 Jul 2024 18:41:13 -0400 Subject: [PATCH] compat notice for a[begin] indexing (#55197) `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 43df7fb6722a18f1e4f9a4649be664b23af6a0d5) --- base/docs/basedocs.jl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/base/docs/basedocs.jl b/base/docs/basedocs.jl index 76fe6b063835f..8572ca4637276 100644 --- a/base/docs/basedocs.jl +++ b/base/docs/basedocs.jl @@ -1354,7 +1354,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