Skip to content

Commit

Permalink
review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
shayanhabibi committed Nov 9, 2021
1 parent 1dee7e6 commit bc9d020
Showing 1 changed file with 7 additions and 27 deletions.
34 changes: 7 additions & 27 deletions tests/lang/s01_basics/s00_atoms/t01_statement.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down Expand Up @@ -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
## ```
Expand All @@ -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
Expand Down

0 comments on commit bc9d020

Please sign in to comment.