richw@ada-uts (06/03/86)
CLU supports multiple assignment to some extent. For instance, you can use the following to swap the values of two variables: x, y := y, x You can even define procedures which return more than one result. As an example header, you could define a procedure to return the numerator and the denominator (after reduction) for a fraction: components = proc (f : Fraction) returns (int, int) However, CLU limits the use of such a procedure. Although you can "catch" the results using assignment: n, d := Fraction$components(f) you can't use both results as procedure arguments in one call: sum := Int$add(Fraction$components(f)) % Nope ! (note that %'s introduce comments in CLU).