Re: something nice I found today, return multiple values from a function
- To: mathgroup at smc.vnet.net
- Subject: [mg113095] Re: something nice I found today, return multiple values from a function
- From: "Nasser M. Abbasi" <nma at 12000.org>
- Date: Tue, 12 Oct 2010 13:51:56 -0400 (EDT)
- Reply-to: nma at 12000.org
On 10/12/2010 3:52 AM, Nasser M. Abbasi wrote: > > -------------------- > getPointCoordinates[] := Module[{x,y}, {x -> 10, y -> 7}] > > p = getPointCoordinates[]; > x = x /. data; > y = y /. data; > > Print["x=", x] > Print["y=", y] > > x=10 > y=7 > --------------------- > Opps, I was in middle of editing and pasted earlier version, here is the final version: ------------------ getPointCoordinates[x_, y_] := Module[{}, {x -> 10, y -> 7}] p = getPointCoordinates[x, y]; x = x /. p; y = y /. p; Print["x=", x] Print["y=", y] x=10 y=7 -------------------- --Nasser
- Follow-Ups:
- Re: something nice I found today, return multiple values from a function
- From: "Ingolf Dahl" <ingolf.dahl@telia.com>
- Re: something nice I found today, return multiple values from a function