Your question needs to be a little more clear. Provide code and the background for your question - otherwise it might be taken as homework (which shouldn't be posted here).
Are you talking about function returns? Or a program return value, such as one that can be retrieved with an echo $? after the program runs?
If the latter, it's a simple exit(-1) or some number. Please elaborate.