in reply to "Subroutine basics" What does -1 mean ?
exit -1 means that the author is lazy. What you are "supposed" to do is return a meaningful error code to the operating system. No OS that I'm aware actually does anything very useful with that exit code so we all get lazy and just use -1. Not to mention that error codes are generally non-portable and therefore pretty useless.