Path: utzoo!mnetor!uunet!husc6!bbn!rochester!cornell!batcomputer!left!gary From: gary@left.soe.clarkson.edu (Gary Levin) Newsgroups: comp.lang.misc Subject: Returning multiple values Message-ID: <509@left.soe.clarkson.edu> Date: 7 Mar 88 16:08:30 GMT References: <25284@cca.CCA.COM> <700@l.cc.purdue.edu> Reply-To: gary@left.mcs.clarkson.edu.UUCP (Gary Levin) Distribution: na Organization: Clarkson University, Potsdam, NY Lines: 37 Keywords: SETL ISETL Summary: Call by ref can be replaced by more powerful assignment References from previous articles are below my follow-up. SETL has always permitted assignments to tuples (its name for lists), and functions can return tuples. The assignment [x,y] := [y,x]; provides swap, for instance. SETL was developed at the Courant Institute. See Schwartz et al. Programming with sets: An introduction to SETL. Springer-Verlag, 1986. Those interested in trying SETL can write to me. I have developed an interactive version of SETL, called ISETL. It is highly portable, written in C, and available for MS-DOS (256K min), Mac, Vax (Unix and VMS), Suns. Source is available for those wishing to compile for other machines. If you get it electronically, there is no fee. $10 for printed documentation, $10 per media shipped. ===== Original ==== In article <700@l.cc.purdue.edu> cik@l.cc.purdue.edu (Herman Rubin) writes: >In article <25284@cca.CCA.COM>, g-rh@cca.CCA.COM (Richard Harter) writes: > ........ >> But how do I get stuff back. I can pass one thing back >> via the return statement. To pass more than one thing I have to play >> games. ... > >No, what is needed is to abandon the mistaken notion that a function >returns a single result. From day one, lists should have been allowed >to the left of the replacement sign--this is not just for functions, >but even for direct operators. For example, ... --- Gary Levin / Clarkson Univ / Potsdam, NY 13676 (315) 268-2384 gary@clutx.bitnet, gary@clutx.clarkson.edu -- Gary Levin / Clarkson Univ / Potsdam, NY 13676 (315) 268-2384 gary@clutx.bitnet, gary@clutx.clarkson.edu