From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mod.civil.su.OZ.AU ([129.78.142.6]) by hawkwind.utcs.toronto.edu with SMTP id <2689>; Sun, 13 Dec 1992 21:05:31 -0500 Received: by mod.civil.su.oz.au id <28680>; Mon, 14 Dec 1992 13:04:48 +1100 From: John (I don't want no teenage queen / I just want my M-fourteen) Mackin Date: Sun, 13 Dec 1992 20:58:29 -0500 To: The rc Mailing List Subject: An interesting (maybe) point Message-ID: <199212141258.4391.rc.bafeg@civil.su.oz.au> X-Face: 39seV7n\`#asqOFdx#oj/Uz*lseO_1n9n7rQS;~ve\e`&Z},nU1+>0X^>mg&M.^X$[ez>{F k5[Ah<7xBWF-@-ru?& @4K4-b`ydd^`(n%Z{ After the discussions of some months back regarding "what is a function", and "what is a return value", I pricked up my ears (as it were) when I saw the following arrive on the ZMailer mailing list. For those who aren't familiar with it, ZMailer is a mail delivery system. Part of it is a shell, called "zsh", which is not to be confused with the PD interactive shell of the same name. ZMailer's zsh is intended to be Bourne-with-extensions, and is used for writing ZMailer's configuration scripts. It has lists, and its lists nest, unlike rc. That (IMHO) makes it much harder to program in -- rc's flat lists are a much more natural model for a shell. Anyway, here is a cautionary tale that demonstrates what happens when you don't keep the overall guiding principle of what you are doing carefully in mind. OK, John. --- begin message from ZMailer list From: Felix Lee Date: Tue, 8 Dec 1992 03:13:30 +1100 To: zmailer@cs.toronto.edu Subject: zmailer, zsh makes numbers disappear. Message-Id: <92Dec7.110320est.87558@guardian.cs.psu.edu> If you send mail to "123456", zmailer bounces it back correctly, but the error says "no such user -" instead of "no such user 123456". The number disappears because crossbar calls (uucproute "123456"), and uucproute does a (return "$address"), where address=123456. The problem is 'return' behaves entirely differently when it's given a number. This is a strange problem with zsh. It looks like this will also cause other subtle router problems that rarely occur in normal operation, but will get exposed by the right combination of errors. Workaround: replace all occurrences of (return $string) with (echo $string; return), which a little less efficient, but does the correct thing. - -- --- end message from ZMailer list