MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: returning variable number of arguments from a Module[ ]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg71517] Re: [mg71477] returning variable number of arguments from a Module[ ]
  • From: "Chris Chiasson" <chris at chiasson.name>
  • Date: Tue, 21 Nov 2006 07:05:14 -0500 (EST)
  • References: <200611201117.GAA07275@smc.vnet.net>

These functions don't really work like that. In your example, the only
two arguments of module are:

1. {t,s}

2. t=x+y; s = t*y

On 11/20/06, bd satish <bdsatish at gmail.com> wrote:
> Hi ,
>
>          Is there any method to return a variable number of arguments from a
> Module[ ] or Block[ ] depending upon the o/p list ?
>
> For example, consider a module
>
>           f[x_,y_]:= Module[ {t,s} , t=x+y; s = t*y  ]
>
> Also  assume that , the variable 's' has higher priority than 't' . So when
> a user types a single o/p variable i.e.
>
>  W = f[x,y]                then W should have the same value as 's' in the
> module
>
> { W, Y } = f[x,y]        then W points to 's' and 'X' points to 't'
>
> If I try to do the above ,I'm getting some warning messages..
>
> Please help.
>
>
>


-- 
http://chris.chiasson.name/


  • Prev by Date: Re: symbolic solution of ODE
  • Next by Date: Re: documentation NestWhile
  • Previous by thread: returning variable number of arguments from a Module[ ]
  • Next by thread: Re: returning variable number of arguments from a Module[ ]