home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Unix / Shells / zsh / Source / help / return < prev    next >
Encoding:
Text File  |  1993-10-08  |  1.0 KB  |  19 lines

  1.        return [ n ]
  2.               Causes  a  shell  function or . script to return to
  3.               the invoking script with the return  status  speci-
  4.               fied  by n.  If n is omitted then the return status
  5.               is that of the last command executed.
  6.  
  7.               If return was executed from a trap, whether set  by
  8.               the trap builtin or by defining a TRAPxxx function,
  9.               the effect  is  different  for  zero  and  non-zero
  10.               return  status.   With  zero  status  (or  after an
  11.               implicit return at the end of the trap), the  shell
  12.               will  return to whatever it was previously process-
  13.               ing; with a non-zero status, the shell will  behave
  14.               as interrupted except that the return status of the
  15.               trap is  retained.   Note  that  the  signal  which
  16.               caused the trap is passed as the first argument, so
  17.               the statement `return $[128+$1]'  will  return  the
  18.               same  status as if the signal had not been trapped.
  19.