Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blank line placement in example #29

Closed
drewajp opened this issue Jul 22, 2018 · 4 comments
Closed

Blank line placement in example #29

drewajp opened this issue Jul 22, 2018 · 4 comments

Comments

@drewajp
Copy link

drewajp commented Jul 22, 2018

The current example has

Give back your heart
{blank line}
{blank line}
Desire is a lovestruck ladykiller

It should be

Take your soul from your heart 
{blank line} 
Give back your heart 
{blank line} 
Desire is a lovestruck ladykiller

since it should return the the value after exiting the while loop

@dylanbeattie
Copy link
Collaborator

You're absolutely right - fix incoming.

Also, you can include code blocks in issues by enclosing them in triple backticks

like this

:)

@N-Masi
Copy link

N-Masi commented Jul 22, 2018

I think there's even more issues. The actual FizzBuzzing part of the example involves nested blocks, there's the main Until my world is Desire block and the 3 nested If blocks. However there is no documentation for using nested blocks. If I were to make a suggestion it would be to bring back the reserved and and use it such that each loop would only execute the line below it (such as If statements do in Java) as well as any lines below it that start with and up until there is a line that doesn't begin with and. So the issue you pointed out would be alleviated because the while loop would only execute the next line (Take your soul from your heart) and wouldn't move on the the Give statement until the while statement was broken because there's no and in front of the Give.

@wolfgang42
Copy link
Contributor

@N-Masi How does that work with nested blocks, though? If you have leading Ands, there's no way to close an inner block without closing the outer block.

@N-Masi
Copy link

N-Masi commented Jul 22, 2018

@wolfgang42 You know that's a good point and after thinking about it for a bit and looking at Dylan's fix I think his idea of just using blank lines to denote the end of blocks works way better than mine due to what you just pointed out. Though I wonder if you could replace the blank line with some sort of phrase such as That's the end of that or something else more poetically inspired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants