-
asp die()
I'm extending an online equipment and lab signup that the faculty at my school can use. The original author obviously knew very little about programming, plus it's written in vbscript.
Putting my complaints aside, is there a function similar to php's die()?
-
In C/C++?
Yes, exit() or abort().
Code:
#include <stdlib.h> /* C */
#include <cstdlib> // C++
if(error) exit(1);
if(another_error) abort();
exit() is safer than abort(). You can also specify a value to exit with.
[edit]
If you're in main() just use
Code:
return value; /* 0 for normal exit, nonzero for error */
[/edit]
-
sorry I didn't specify, I meant asp vbscript.
-
-
That's what I needed, thank you.