Timeline for Checking the argument of user-defined function with side-effect method
Current License: CC BY-SA 3.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 29, 2015 at 1:59 | history | bounty ended | xyz | ||
Jul 29, 2015 at 1:59 | vote | accept | xyz | ||
Jul 29, 2015 at 1:59 | |||||
Jul 24, 2015 at 11:58 | comment | added | Mr.Wizard | @Shutao FYI I am not ignoring you; I've just got other things to work on too. | |
Jul 23, 2015 at 14:35 | comment | added | xyz |
The Toad's comment: throwing messages as a side-effect of not matching the form will result in all messages being thrown . But , for me, I don't know how to implement this(throwing messages as a side-effect). So could you give me a demo by this Bernstein case? ThX!
|
|
Jul 23, 2015 at 14:15 | comment | added | Mr.Wizard |
@Shutao If you want more than one error message you can issue the Message as a side-effect rather than a match on checkArgs . The evaluator would then try all of the checks rather that stopping after the first Message . However if you want all messages to fire I think it is actually better or at least easier to make the definition upon the primary function (Bernstein ). The methods I described were posted in response to the implied desire not to issue multiple messages.
|
|
Jul 23, 2015 at 13:45 | comment | added | xyz |
+1,THX, Now I utilize the followng cases: Bernstein[3.2, 1, u] ,Bernstein[3, 1.2, u] and Bernstein[5, 6, u] to test the funtion Bernstein and then they give the desired error informtion respectively. However, I would like to how inplement the checkArg to make the Bernstein[3.2, 1.2, u] return two error-message like BernsteinBasis[3.2, 1.2, u]
|
|
Jul 23, 2015 at 13:29 | history | edited | xyz | CC BY-SA 3.0 |
edited body
|
Jul 23, 2015 at 12:52 | history | answered | Mr.Wizard | CC BY-SA 3.0 |