$AssertFunction
指定一个函数,用于失败的断言.
范例
基本范例 (1)
当断言失败时您可以通过给 $AssertFunction 赋值改变行为. 当断言失败时,下面这个函数抛出一个异常信息:
相关指南
-
▪
- 调整和调试
文本
Wolfram Research (2010),$AssertFunction,Wolfram 语言函数,https://reference.wolfram.com/language/ref/$AssertFunction.html.
CMS
Wolfram 语言. 2010. "$AssertFunction." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/$AssertFunction.html.
APA
Wolfram 语言. (2010). $AssertFunction. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/$AssertFunction.html 年
BibTeX
@misc{reference.wolfram_2025_$assertfunction, author="Wolfram Research", title="{$AssertFunction}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/$AssertFunction.html}", note=[Accessed: 29-April-2026]}
BibLaTeX
@online{reference.wolfram_2025_$assertfunction, organization={Wolfram Research}, title={$AssertFunction}, year={2010}, url={https://reference.wolfram.com/language/ref/$AssertFunction.html}, note=[Accessed: 29-April-2026]}