home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!think.com!barmar
- From: barmar@think.com (Barry Margolin)
- Newsgroups: comp.unix.questions
- Subject: Re: Simple C shell ? regarding switch
- Date: 26 Jan 1993 19:56:28 GMT
- Organization: Thinking Machines Corporation, Cambridge MA, USA
- Lines: 20
- Message-ID: <1k451cINNcqf@early-bird.think.com>
- References: <1k2f0bINNjdi@darkstar.UCSC.EDU>
- NNTP-Posting-Host: telecaster.think.com
-
- In article <1k2f0bINNjdi@darkstar.UCSC.EDU> caedmon@cats.ucsc.edu (Jeff A Ishaq) writes:
- >I assume the reason this doesn't work is I need to do something 'special'
- >to 1: -- something like '1': ? Ideas?
-
- No, you have to put the keyword "case" before the case labels, e.g.
-
- switch ($selection)
- case 1:
- ...
- case 2:
- ...
- ...
- default:
- ...
- endsw
- --
- Barry Margolin
- System Manager, Thinking Machines Corp.
-
- barmar@think.com {uunet,harvard}!think!barmar
-