So while testing this (the rest of the code is irr...
# announcements
a
So while testing this (the rest of the code is irrelevant) I terminated the program while the readLine code was being used and it gave me an error and it still printed but it printed "null" but I don't want that to happen. I just want the program to terminate. I guess I'm too used to Java where you can just terminate the program as it is except it has to close up loops and stuff. So since that is the case where I have to close loops before the program terminates completely, I was wondering how I would break out of the loop if the program terminates. Is there some kind of variable or function that returns some kind of value depending on the status of the program like how in C++ there main function has a return statement of 0 if it the program can continue, or anything but 0 if something went wrong?