The D Programming Language

Michael R. DeCorte mrd at sun.soe.clarkson.edu
Tue Mar 8 00:13:38 AEST 1988


Posting-Front-End: GNU Emacs 18.47.2 of Thu Dec 10 1987 on sun.mcs.clarkson.edu (berkeley-unix)


In article <700 at l.cc.purdue.edu> cik at l.cc.purdue.edu (Herman Rubin) writes:

   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, the infamous frexp function
   in C should not have the syntax

	   y = frexp(x,&n);

   but

	   y,n = frexp(x);


Isetl has something of this sort.  In Isetl [1,2,3] is a tuple and
if you say
[a,b] := [b,a];
you have a swap routine.

[a,b,c] := f();

and f() returns [1,2,3] you will get the assignments that you want.


Views expressed here do not represent Clarkson University or any part of it.
Michael DeCorte // (315)268-3704 // P.O. Box 652, Potsdam, NY 13676
Internet mrd at clutx.clarkson.edu  // BIX        DMichael 
Bitnet   mrd at clutx.bitnet        // Compuserve 72220,3724



More information about the Comp.lang.c mailing list