FailureQ

FailureQ[expr]

如果 expr 有页头 Failure 或等于 $Failed$Aborted,则给出 True.

范例

打开所有单元关闭所有单元

基本范例  (1)

检测一个表达式是否代表失败

选出不代表失败的表达式:

属性和关系  (1)

当一个操作不能被执行时, $Failed 被返回:

失败目标当其不能产生结果时由如 Interpreter 的函数返回:

Abort[] 执行或用户手动终止一个运算时, $Aborted 被返回:

可能存在的问题  (2)

Failure 符号自身并不表示失败:

一个函数估值或信息生成失败不代表失败:

估值生成信息时用 Check 来检测:

Wolfram Research (2015),FailureQ,Wolfram 语言函数,https://reference.wolfram.com/language/ref/FailureQ.html.

文本

Wolfram Research (2015),FailureQ,Wolfram 语言函数,https://reference.wolfram.com/language/ref/FailureQ.html.

CMS

Wolfram 语言. 2015. "FailureQ." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/FailureQ.html.

APA

Wolfram 语言. (2015). FailureQ. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/FailureQ.html 年

BibTeX

@misc{reference.wolfram_2024_failureq, author="Wolfram Research", title="{FailureQ}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/FailureQ.html}", note=[Accessed: 22-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_failureq, organization={Wolfram Research}, title={FailureQ}, year={2015}, url={https://reference.wolfram.com/language/ref/FailureQ.html}, note=[Accessed: 22-November-2024 ]}