User Portlet
Discussions |
---|
One way is to Throw and Catch False values for an early exit[mcode]In[1]:= isValidInputPair[x_, y_] := If[TrueQ@OddQ[x + y], True, Message[f::invld, x, y]; False] In[2]:= f::invld = "`1` and `2` are invalid arguments"; f[arg1_, args__] :=... |
There's also a useful how-to in Documentation that talks about this... [url=http://reference.wolfram.com/mathematica/howto/PerformOperationsOnSubgroupsOfData.html]How to Perform Operations on Subgroups of Data[/url] |