Incorrectly Closed Subroutine, Line or Library

All subroutines begin with a { and end with a } (open/closed bracket).

Most lines must end with a ; (semicolon).

Though there are times when you really don’t need the final semi-colon, if you’re not 100% sure when you do and don’t need it, toss it in for good measure. It doesn’t hurt to always have it, but it’ll hurt when it’s missing.

The last line of a library (a file that does not actually perform any function, but lists variables or contains only subroutines) must be: 1; (the number one and a semicolon). This is because each file in the program must return a true value. Placing a 1; on the last line accomplishes this.

Was this article helpful?

Related Articles