Re: Beginner--How to simulate multiple returns for a function?
- To: mathgroup at smc.vnet.net
- Subject: [mg66441] Re: Beginner--How to simulate multiple returns for a function?
- From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
- Date: Fri, 12 May 2006 02:03:50 -0400 (EDT)
- Organization: Uni Leipzig
- References: <Pine.GSO.4.44.0605100054500.17163-100000@smc> <e3v0tt$pav$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi,
what are multiple returns ?
a) f[x_]:=Module[{lst},
If[x<1,Return[x]];
Table[x,{42}]
]
b) f[x_]/; x<1:=x
f[x_]:=Table[x,{42}]
c) f[x_]:={x,Table[x,{42}]}
Regards
Jens
"xiaochu" <xiaochu at che.utexas.edu> schrieb im
Newsbeitrag news:e3v0tt$pav$1 at smc.vnet.net...
|
| Hi, All,
|
| Another system's functions can have multiple
returns, does
| Mathematica support this?
|
| Link to the forum page for this post:
|
http://www.mathematica-users.org/webMathematica/wiki/wiki.jsp?pageName=Special:Forum_ViewTopic&pid=10267#p10267
| Posted through http://www.mathematica-users.org
[[postId=10267]]
|
|
|
|