MathGroup Archive 2006

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

Search the Archive

returning variable number of arguments from a Module[ ]


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[ ]