Contents | Index | < Browse | Browse >


   $$RetCode

  There are certain commands which set the $$RETCODE.

  This tells you the "return code" of the command, i.e. whether 
  the command succeeded or failed. Usually a 0 means success.

  RetCode will be valid for recursive Gui4Cli commands such as
  copy etc, as well as ARexx commands given with SendRexx.

  Also, if you issue a CLI command you can afterwards check the
  $$RETCODE, to see if the command was successful. 

  Example :

     CLI 'c:copy Myfile to ram:myfile'
     if $$RETCODE = 0
        say "File copied"
     else
        say "Error during copy"
     endif

  The $$retcode will only make sence in CLI commands which are 
  not "run >nil:" because otherwise it will tell you if the "run" 
  commmand succeeded and not the command itself..

  See also  $$RexxRet