From 1bb145fa097bcead2910315e51a18d47e309cb68 Mon Sep 17 00:00:00 2001 From: Andrew Gerrand Date: Mon, 29 Jul 2013 18:53:45 +1000 Subject: go.blog: clarfiy wording of nth array element This is the analog to https://golang.org/cl/11892043/ R=r https://golang.org/cl/12017043 --- content/go-slices-usage-and-internals.article | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'content') diff --git a/content/go-slices-usage-and-internals.article b/content/go-slices-usage-and-internals.article index 3561220..d4a50fd 100644 --- a/content/go-slices-usage-and-internals.article +++ b/content/go-slices-usage-and-internals.article @@ -12,7 +12,7 @@ Go's slice type provides a convenient and efficient means of working with sequen The slice type is an abstraction built on top of Go's array type, and so to understand slices we must first understand arrays. -An array type definition specifies a length and an element type. For example, the type `[4]int` represents an array of four integers. An array's size is fixed; its length is part of its type (`[4]int` and `[5]int` are distinct, incompatible types). Arrays can be indexed in the usual way, so the expression `s[n]` accesses the nth element: +An array type definition specifies a length and an element type. For example, the type `[4]int` represents an array of four integers. An array's size is fixed; its length is part of its type (`[4]int` and `[5]int` are distinct, incompatible types). Arrays can be indexed in the usual way, so the expression `s[n]` accesses the nth element, starting from zero. var a [4]int a[0] = 1 -- cgit v1.2.3