How to exit app with a value?

BlitzMax Forums/BlitzMax Programming/How to exit app with a value?

WriteStdout("42"+"~n")
should do the trick.