_? contains the exit code of the last internal command. You must use or save this value immediately, because it is set by every internal command, including the one used to save it.


Result codes:

0command was successful        
1a usage error occurred        
2another TCC-RT error or an operating system error occurred        
3the command was interrupted by Ctrl-C or Ctrl-Break        


This variable can also be set in a subroutine by the RETURN command.


Note that in imitation of CMD some internal commands, e.g., DIR, also set the variables ? and ERRORLEVEL to the same value they set this variable. However, you are strongly urged to use this variable.


See also: ?