@@ -303,10 +303,11 @@ $(GNAME WhileStatement):
303
303
304
304
$(P A $(I While Statement) implements a simple loop.)
305
305
306
- $(P $(EXPRESSION) is evaluated and must have a type that can be converted to a
307
- boolean. If it's true the $(PSSCOPE) is executed. After the $(PSSCOPE) is
308
- executed, the $(EXPRESSION) is evaluated again, and if true the $(PSSCOPE) is
309
- executed again. This continues until the $(EXPRESSION) evaluates to false.)
306
+ $(P If the $(GLINK IfCondition) is an $(EXPRESSION), it is evaluated and must have a type
307
+ that can be converted to a boolean. If it's true the $(PSSCOPE) is executed.
308
+ After the $(PSSCOPE) is executed, the $(EXPRESSION) is evaluated again, and
309
+ if true the $(PSSCOPE) is executed again. This continues until the $(EXPRESSION)
310
+ evaluates to false.)
310
311
311
312
---
312
313
int i = 0;
@@ -317,15 +318,22 @@ while (i < 10)
317
318
}
318
319
---
319
320
320
- $(P A $(GLINK BreakStatement) will exit the loop.)
321
+ $(P If an $(D auto) $(I Identifier) is provided, it is declared and
322
+ initialized to the value and type of the $(EXPRESSION). Its scope
323
+ extends from when it is initialized to the end of the $(PSSCOPE).)
321
324
322
- $(P A $(GLINK ContinueStatement) will transfer directly to evaluating $(EXPRESSION) again.)
325
+ $(P If a $(I TypeCtors) $(I Identifier) is provided, it is declared
326
+ to be of the type specified by $(I TypeCtors) and is initialized with
327
+ the value of the $(EXPRESSION). Its scope extends from when it is
328
+ initialized to the end of the $(PSSCOPE).)
323
329
324
- $(P A $(I While Statement) is equivalent to:)
330
+ $(P If a $(I Declarator) is provided, it is declared and initialized
331
+ to the value of the $(EXPRESSION). Its scope extends from when it is
332
+ initialized to the end of the $(PSSCOPE).)
325
333
326
- ---
327
- for (; Expression; ) ScopeStatement
328
- ---
334
+ $(P A $(GLINK BreakStatement) will exit the loop.)
335
+
336
+ $(P A $(GLINK ContinueStatement) will transfer directly to evaluating $(GLINK IfCondition) again.)
329
337
330
338
$(H2 $(LEGACY_LNAME2 DoStatement, do-statement, Do Statement))
331
339
0 commit comments