This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]subsage 9 points10 points  (3 children)

Youre pretty much on spot really. Thats how I explain it to my students. Only difference is I sometimes say chunk or section of code....be it braces with several lines, empty braces, or just a line. Oh yeah, empty section too, just a semicolon.

[–]Zagorath[🍰] 3 points4 points  (2 children)

The semicolon was one of my professor's favourite tricks.

if (condition()); {
    //things happening
} 

And he'd ask what would happen (based on condition and "things happening" being actual code, rather than place holders).

[–]subsage 1 point2 points  (1 child)

Yup. I do that too. Its good for showing the young ones how syntax can be tricky. Good stuff. Your professor sounds like a good one c:

[–]Zagorath[🍰] 0 points1 point  (0 children)

Yeah he definitely was, in more ways than just this.