diff --git a/doc/go_spec.html b/doc/go_spec.html index 1a60a9eac7..5872eefb03 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -4799,8 +4799,8 @@ The "fallthrough" statement is not permitted in a type switch.

For statements

-A "for" statement specifies repeated execution of a block. The iteration is -controlled by a condition, a "for" clause, or a "range" clause. +A "for" statement specifies repeated execution of a block. There are three forms: +The iteration may be controlled by a single condition, a "for" clause, or a "range" clause.

@@ -4808,6 +4808,8 @@ ForStmt = "for" [ Condition | ForClause | RangeClause ] Block .
 Condition = Expression .
 
+

For statements with single condition

+

In its simplest form, a "for" statement specifies the repeated execution of a block as long as a boolean condition evaluates to true. @@ -4822,6 +4824,8 @@ for a < b { } +

For statements with for clause

+

A "for" statement with a ForClause is also controlled by its condition, but additionally it may specify an init @@ -4860,6 +4864,8 @@ for cond { S() } is the same as for ; cond ; { S() } for { S() } is the same as for true { S() } +

For statements with range clause

+

A "for" statement with a "range" clause iterates through all entries of an array, slice, string or map,