From: MenTaLguY Date: 2008-03-25T08:24:19+09:00 Subject: Re: functions, arguments and changing their value permantent On Tue, 25 Mar 2008 08:06:38 +0900, Adam Akhtar wrote: > Thank you so much for all of your detailed replies. Some of you asked > why I wanted to do this and why don`t I just return the value to the > variable I want to change ala x = doit x > > Well actually my function changes 2 values. Functions can only pass one > back so I thought I`d pass one as an argument as well. Is that bad > programming design? What are other options? You could have the function return multiple values as an array: def foo(x, y) [ x + y, x * y ] end sum, product = foo(2, 3) puts sum puts product -mental