The number used is not special in any way. It is returned to the calling script or program, which can decide what to do depending on the number that you returned.

You might choose "1" to mean "Some sort of problem happened", "2" to mean "I cannot find the file", "5" to mean "I don't have permission to open the file" and so-on.

The only rule you should stick to is that zero means that there was no problem.

It is a good idea to try an use a number whose Windows/DOS error message has a similar meaning.

To display some of the standard error messages:
Code:
Break On
For $i = 0 to 9999
$=Execute("Exit "+$i)
If Not InStr(@SERROR,"(317 / 13D)")
@ERROR " : " @SERROR @CRLF
EndIf
Next



If you only ever want to determine whether an error occurred or not, you may simply stick to "0" for no error and "1" for error.