Minor fixes
This commit is contained in:
parent
8397eac55b
commit
0ec510af11
7 changed files with 21 additions and 20 deletions
|
|
@ -31,14 +31,14 @@ else:
|
|||
|
||||
proc positiveOrNegative(num: int): string =
|
||||
result = case num
|
||||
of low(int)..-1:
|
||||
"negative"
|
||||
of 0:
|
||||
"zero"
|
||||
of 1..high(int):
|
||||
"positive"
|
||||
else:
|
||||
"impossible"
|
||||
of low(int)..-1:
|
||||
"negative"
|
||||
of 0:
|
||||
"zero"
|
||||
of 1..high(int):
|
||||
"positive"
|
||||
else:
|
||||
"impossible"
|
||||
|
||||
echo positiveOrNegative(-1)
|
||||
```
|
||||
|
|
@ -63,4 +63,4 @@ of 10: echo "D"
|
|||
``` console
|
||||
$ nimrod c -r ./case_stmts_1.nim
|
||||
C
|
||||
```
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue