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.
- Follow-Ups:
- Re: returning variable number of arguments from a Module[ ]
- From: "厉正吉" <zhengji.li@gmail.com>
- Re: returning variable number of arguments from a Module[ ]
- From: "Chris Chiasson" <chris@chiasson.name>
- Re: returning variable number of arguments from a Module[ ]