zsh-workers
 help / color / mirror / code / Atom feed
* Function question
@ 1995-08-04 23:38 Vidiot
  0 siblings, 0 replies; only message in thread
From: Vidiot @ 1995-08-04 23:38 UTC (permalink / raw)
  To: ZSH Mailing List

The following function example is given in an older copy of the zsh
introduction and I am wondering if it is wrong:

yp () {
	if (( $# == 0 ))
	then echo usage: yp name ...; fi
	for i; do ypmatch $1 passwd.byname; done
}

The document says that if nothing is passed to yp, it should do the echo
and exit, otherwise it should do the for loop.

To me it seems that if the number of arguments is zero, it should do the
echo and still attempt the for loop.  But, because there are no argument,
the for loop should produce nothing.

Am I missing something here?

MB
-- 
System Administrator - Extrel FTMS - Madison WI.
e-mail: brown@ftms.com
phone: (608) 273-8262  fax: (608) 273-8719  voice-mail: (800) 426-6488 ext 6293
Visit - <http://www.cdsnet.net/vidiot/>  (Your link to the world of Star Trek)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1995-08-05  8:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1995-08-04 23:38 Function question Vidiot

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).