zsh-users
 help / color / mirror / code / Atom feed
From: Bernd Eggink <eggink@uni-hamburg.de>
To: "Owen M. Astley" <oma1000@cam.ac.uk>
Cc: zsh-users@math.gatech.edu
Subject: Re: exiting from functions and scripts
Date: Fri, 17 Apr 1998 10:57:34 +0200	[thread overview]
Message-ID: <3537197E.6FD1B871@rrz.uni-hamburg.de> (raw)
In-Reply-To: <Pine.OSF.3.96.980417090442.15045D-100000@alpha3.poco.phy.cam.ac.uk>

Owen M. Astley wrote:
> 
> Is there a command that will exit from a function or script with a
> particular code?
> eg something like exit (that only works in scripts) or return (that only
> works in functions)

Exit works in functions, too. It returns from the shell (not just the
function) with a given code. Return works in scripts, too. If called
outside a function, it behaves like exit.

Regards,
	Bernd
--
Bernd Eggink
Regionales Rechenzentrum der Uni Hamburg
eggink@rrz.uni-hamburg.de
http://www.rrz.uni-hamburg.de/eggink/BEggink.html


      reply	other threads:[~1998-04-17  9:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-04-17  8:06 Owen M. Astley
1998-04-17  8:57 ` Bernd Eggink [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3537197E.6FD1B871@rrz.uni-hamburg.de \
    --to=eggink@uni-hamburg.de \
    --cc=oma1000@cam.ac.uk \
    --cc=zsh-users@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).