MathGroup Archive 2006

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

Search the Archive

returning variable number of arguments from a Module[ ]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg71477] returning variable number of arguments from a Module[ ]
  • From: "bd satish" <bdsatish at gmail.com>
  • Date: Mon, 20 Nov 2006 06:17:10 -0500 (EST)

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.



  • Prev by Date: Re: a (serious) question about character codes in Mathematica
  • Next by Date: Re: plot question
  • Previous by thread: RE: Re: Best practice for naming of options
  • Next by thread: Re: returning variable number of arguments from a Module[ ]