cancel
Showing results for 
Search instead for 
Did you mean: 

Indent on function closing bracket

bmar
New Contributor

The issue (if I can call it that) has been resolved. Maybe this post might help save someone else some time if similar is encountered.

While doing exercise 19 in introductory workshop I kept getting parse error (as per attached image). I tried removing spaces around operators, adding semi-columns, removing parameters but without success. Purely by accident I moved the closing bracket inline with function body and it worked!?

While material does say that body of the function should be indented, it does not explicitly mentions closing bracket. Coming from C/C++ background, closing bracket is usually at the same level as opening statement. (or whatever is agreed in coding style - it is a lot more flexible - Q seems to be quite brittle)

It might be worth adding a statement to that effect for noobs like myself

firefox_BOCTy5jeTH.png

1 REPLY 1

megan_mcp
Community Manager Community Manager
Community Manager

Hi @bmar,

Thank you for this feedback. We have taken this into consideration and made adjustments to the material so that it is made clear for future users.

Thanks again,

Megan 🙂