home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.next.bugs
- Path: sparky!uunet!news.univie.ac.at!chx400!bernina!waldvoge
- From: waldvoge@nessie.cs.id.ethz.ch (Marcel Waldvogel)
- Subject: /bin/sh $# bug with nested functions
- Message-ID: <1993Jan12.160259.7994@bernina.ethz.ch>
- Sender: news@bernina.ethz.ch (USENET News System)
- Organization: Swiss Federal Institute of Technology (ETH), Zurich, CH
- Date: Tue, 12 Jan 1993 16:02:59 GMT
- Lines: 28
-
- Another nasty bug (which prevents me using 'shql' for now):
-
- #!/bin/sh
- nested_func(){
- echo "inside: $#"
- }
- func(){
- echo "before: $#"
- nested_func 6 7 8
- echo "after : $#"
- }
- func 1 2 3 4 5
-
- gives the following output (on 2.1 and on 3.0):
-
- before: 5
- inside: 3
- after : 3
-
- Every other system I've tried returns
-
- before: 5
- inside: 3
- after : 5
-
- This is in accordance to what I expect from the behaviour of parameter passing.
-
- -Marcel
-