From bc9d020ed6c4e9e4b01ba0e6d6071aec3746b245 Mon Sep 17 00:00:00 2001 From: shayanhabibi Date: Tue, 9 Nov 2021 16:33:03 +0800 Subject: [PATCH] review fixes --- .../s01_basics/s00_atoms/t01_statement.nim | 34 ++++--------------- 1 file changed, 7 insertions(+), 27 deletions(-) diff --git a/tests/lang/s01_basics/s00_atoms/t01_statement.nim b/tests/lang/s01_basics/s00_atoms/t01_statement.nim index b88f9129158..b0c1cdc4d57 100644 --- a/tests/lang/s01_basics/s00_atoms/t01_statement.nim +++ b/tests/lang/s01_basics/s00_atoms/t01_statement.nim @@ -103,7 +103,8 @@ block noreturn_statement: var value = 0 var cond = true - while cond: # This cyclic path can only be entered if `cond` is true. + while cond: + ## This cyclic path is only entered if `cond` is true. ## First statement in the loop is executed. cond = false @@ -113,9 +114,9 @@ block noreturn_statement: ## Upon reaching `continue`, control flow is transferred to the next ## iteration. continue - # The control flow will return to the beginning of the cyclic path; - # it will re-evaluate `cond` as false and therefore not proceed with - # the next iteration of the cyclic path. + ## The control flow will now return to the beginning of the cyclic path; + ## it will re-evaluate `cond` as false and therefore not proceed with + ## the next iteration of the cyclic path. ## Assignment to value is never reached. @@ -147,16 +148,7 @@ block noreturn_statement: ## ```nim ## i = 0 ## preContinue = preContinue + i - ## - ## i = 1 - ## preContinue = preContinue + i - ## - ## i = 2 - ## preContinue = preContinue + i - ## - ## i = 3 - ## preContinue = preContinue + i - ## + ## # 1, 2, 3... ## i = 4 ## preContinue = preContinue + i ## ``` @@ -166,19 +158,7 @@ block noreturn_statement: ## i = 0 ## preContinue = preContinue + i ## postContinue = 9 - ## - ## i = 1 - ## preContinue = preContinue + i - ## postContinue = 9 - ## - ## i = 2 - ## preContinue = preContinue + i - ## postContinue = 9 - ## - ## i = 3 - ## preContinue = preContinue + i - ## postContinue = 9 - ## + ## # 1, 2, 3... ## i = 4 ## preContinue = preContinue + i ## postContinue = 9