mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-01-14 05:05:59 +00:00
[nim/en] Clarify Nim zero value for uninitialized variables (#4573)
This commit is contained in:
parent
f6f88843aa
commit
9e75ad79c5
@ -188,7 +188,7 @@ echo "I'm thinking of a number between 41 and 43. Guess which!"
|
|||||||
let number: int = 42
|
let number: int = 42
|
||||||
var
|
var
|
||||||
raw_guess: string
|
raw_guess: string
|
||||||
guess: int
|
guess: int # Variables in Nim are always initialized with a zero value
|
||||||
while guess != number:
|
while guess != number:
|
||||||
raw_guess = readLine(stdin)
|
raw_guess = readLine(stdin)
|
||||||
if raw_guess == "": continue # Skip this iteration
|
if raw_guess == "": continue # Skip this iteration
|
||||||
|
Loading…
Reference in New Issue
Block a user