generated from ElnuDev/rust-project
Implement rudimentary control flow
This commit is contained in:
parent
c0c8153cbe
commit
abc17c7c3c
3 changed files with 93 additions and 30 deletions
|
@ -1,13 +1,14 @@
|
|||
"Bob sat on the bench."
|
||||
"Bob" "Good morning!"
|
||||
"Bob" "I am in a block now!"
|
||||
"Bob" "Isn't this cool?"
|
||||
"Bob" "And now we're back in normal indentation."
|
||||
"Bob" "We can even go multiple levels in!"
|
||||
"Bob" "How far does the rabbit hole go?"
|
||||
"Bob" "rabbit hole go?"
|
||||
"Bob" "go?"
|
||||
"Bob" "Not sure what came of me there."
|
||||
"Bob" "I suppose I should eat a potato."
|
||||
eat "potato" True
|
||||
"Bob" "Yum!"
|
||||
# Control testing
|
||||
"Bob" "I will not say anything"
|
||||
if False:
|
||||
"Bob" "W-what? Why am I saying this?"
|
||||
if True:
|
||||
"Testing 123"
|
||||
"..."
|
||||
"Bob" "Good."
|
||||
"Bob" "Now I will tell you my favorite food..."
|
||||
if True:
|
||||
"Bob" "...cereal!"
|
||||
if False:
|
||||
"Bob" "But I actually hate it."
|
||||
"Bob sat on the bench."
|
Loading…
Add table
Add a link
Reference in a new issue