Jamis Buck wrote:

> Brad wrote:
> 
> >a=1
> >b=2
> >
> >def swapper(dest,src)
> >   dest,src=src,dest
> >end
> >
> >swapper(a,b)
> >p [ a, b ]
> >
> >  
> >
> 
> Well... given that the swap is only a one-liner, you really don't need 
> to do the function call at all.  However, I understand there is a deeper 
> issue here--sometimes you want to modify the parameters... What I 
> usually do is just return the modified parameters,  like this:
> 
>    def swaper( dest, src )
>        dest, src = src, dest
>        return [ dest, src ]
>    end
> 
>    a, b = swapper( a, b )
>    p [ a, b ]
> 
> 


Thanks for your speedy response.  You are quite correct as there is a
deeper issue, rather a larger project.  I figured that 8 lines of code
were more illustrative than several hundred. :)

I figured it couldn't hurt to ask.

Thanks,
Brad