From: Mathieu Bouchard Date: 2001-12-06T14:05:24+09:00 Subject: [ruby-talk:27626] Re: References On Thu, 6 Dec 2001, Ralph Mason wrote: > void normalise( var& x, var& y ) { if (x > y ) swap ( x,y); } > def normalise!( x, y ) > //here you get instances of var (the one and only variable class) > x,y = [y,x].sort > end def normalise!(a,b,&context) if eval("#{a}",context) > eval("#{b}",context) eval "#{a},#{b}=#{b},#{a}", context end end > x,y = normalise(x,y) normalise!(:x,:y){} i agree it's not as cute as in C++ or Perl or Tcl. ________________________________________________________________ Mathieu Bouchard http://hostname.2y.net/~matju